From 4050d669768bdb267134a6a6cef9323bd107f79e Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Thu, 31 May 2012 16:49:27 +0000 Subject: [PATCH] -LRN: make watchdog always kill its children --- contrib/timeout_watchdog_w32.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/contrib/timeout_watchdog_w32.c b/contrib/timeout_watchdog_w32.c index 286d39a94..46a615755 100644 --- a/contrib/timeout_watchdog_w32.c +++ b/contrib/timeout_watchdog_w32.c @@ -173,14 +173,16 @@ main (int argc, char *argv[]) if (wait_result != 0) { printf ("Test process exited with result %lu\n", status); + TerminateJobObject (job, status); exit (status); } printf ("Test process exited (failed to obtain exit status)\n"); + TerminateJobObject (job, 0); exit (0); } printf ("Child processes were killed after timeout of %u seconds\n", timeout); - TerminateJobObject (job, 0); + TerminateJobObject (job, 1); CloseHandle (proc.hProcess); exit (1); } -- 2.25.1