Created
March 17, 2015 00:32
-
-
Save jfrost/0b995de75211984db10b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if os.getuid() != 0: | |
print _("You need to be root to run this application") | |
sys.exit(1) | |
# nice & ionce | |
os.nice(19) | |
subprocess.call(["ionice","-c3", "-p",str(os.getpid())]) | |
# run the main code | |
main(options) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment