Skip to content

Commit aac8e0b

Browse files
committed
Make sure that timers are daemons
A pending timer shouldn't block the whole program from exiting.
1 parent 32376ff commit aac8e0b

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

cwltool/job.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -534,6 +534,7 @@ def terminate():
534534
except OSError:
535535
pass
536536
tm = Timer(timelimit, terminate)
537+
tm.daemon = True
537538
tm.start()
538539

539540
rcode = sproc.wait()

cwltool/sandboxjs.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,7 @@ def terminate():
181181
timeout = 20
182182

183183
tm = threading.Timer(timeout, terminate)
184+
tm.daemon = True
184185
tm.start()
185186

186187
stdin_text = u""

0 commit comments

Comments
 (0)