fix cron hang on Ctrl+C terminating from terminal

This commit is contained in:
Oleg Blokhin
2014-05-21 18:18:19 +04:00
parent 92d7ccf331
commit 87cf9307f0
+7 -1
View File
@@ -48,7 +48,13 @@ def stopcron():
global _cron_stopping
_cron_stopping = True
while _cron_subprocs:
_cron_subprocs.pop().terminate()
proc = _cron_subprocs.pop()
if proc.poll() is None:
try:
proc.terminate()
except:
import traceback
traceback.print_exc()
class extcron(threading.Thread):