From 723af8c370169368bb61e8ebce14f676274d0acf Mon Sep 17 00:00:00 2001 From: willthames Date: Tue, 5 Nov 2013 09:42:28 +1000 Subject: [PATCH] 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. --- library/internal/async_wrapper | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/internal/async_wrapper b/library/internal/async_wrapper index d1a87259823..278280ef1a8 100644 --- a/library/internal/async_wrapper +++ b/library/internal/async_wrapper @@ -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)