Revisions
-
sbp revised this gist
Dec 17, 2011 . 1 changed file with 4 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -12,7 +12,10 @@ def send(signal, pids): while 1: send(signal.SIGSTOP, pids) try: time.sleep(sleeptime) except KeyboardInterrupt, e: send(signal.SIGCONT, pids) raise e send(signal.SIGCONT, pids) time.sleep(waketime) -
There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,18 @@ #!/usr/bin/env python import time, os, sys, signal sleeptime = waketime = 0.01 def send(signal, pids): for pid in pids: os.kill(pid, signal) pids = map(int, sys.argv[1:]) while 1: send(signal.SIGSTOP, pids) time.sleep(sleeptime) send(signal.SIGCONT, pids) time.sleep(waketime)