From: Christian Grothoff Date: Thu, 31 May 2012 16:49:27 +0000 (+0000) Subject: -LRN: make watchdog always kill its children X-Git-Tag: initial-import-from-subversion-38251~13339 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=4050d669768bdb267134a6a6cef9323bd107f79e;p=oweals%2Fgnunet.git -LRN: make watchdog always kill its children --- 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); }