fix cron hang on Ctrl+C terminating from terminal
This commit is contained in:
1 parent
92d7ccf331
commit
87cf9307f0
1 file changed
+7
-1
+7
-1
@@ -48,7 +48,13 @@ def stopcron():
|
|||||||
global _cron_stopping
|
global _cron_stopping
|
||||||
_cron_stopping = True
|
_cron_stopping = True
|
||||||
while _cron_subprocs:
|
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):
|
class extcron(threading.Thread):
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user