diff options
Diffstat (limited to 'pyLoadCore.py')
-rwxr-xr-x | pyLoadCore.py | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/pyLoadCore.py b/pyLoadCore.py index 0cdd9efcb..09b039a4e 100755 --- a/pyLoadCore.py +++ b/pyLoadCore.py @@ -211,7 +211,20 @@ class Core(object): try: os.kill(pid, 3) #SIGUIT - print "pyLoad successfully stopped" + + t = time() + print "waiting for pyLoad to quit" + + while exists(self.pidfile) and t + 10 > time(): + sleep(0.25) + + if not exists(self.pidfile): + print "pyLoad successfully stopped" + else: + os.kill(pid, 9) #SIGKILL + print "pyLoad did not respond" + print "Kill signal was send to process with id %s" % pid + except: print "Error quitting pyLoad" |