Ensure async terminates when time limit is not divisible by 5
Because async_wrapper subtracts 5 from time_limit and checks for equality to zero, values not divisible by 5 will go negative and continue forever.
This commit is contained in:
parent
8e105bbfba
commit
723af8c370
1 changed files with 1 additions and 1 deletions
|
@ -180,7 +180,7 @@ try:
|
|||
debug("%s still running (%s)"%(sub_pid, remaining))
|
||||
time.sleep(5)
|
||||
remaining = remaining - 5
|
||||
if remaining == 0:
|
||||
if remaining <= 0:
|
||||
debug("Now killing %s"%(sub_pid))
|
||||
os.killpg(sub_pid, signal.SIGKILL)
|
||||
debug("Sent kill to group %s"%sub_pid)
|
||||
|
|
Loading…
Reference in a new issue