From 324e9da9b0cc3917a4500b4afbe437c225513649 Mon Sep 17 00:00:00 2001 From: Matthias Wachs Date: Mon, 16 Aug 2010 13:41:08 +0000 Subject: fixing bugs --- contrib/timeout_watchdog.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'contrib') diff --git a/contrib/timeout_watchdog.c b/contrib/timeout_watchdog.c index d257d04de..9a1fc006d 100644 --- a/contrib/timeout_watchdog.c +++ b/contrib/timeout_watchdog.c @@ -39,15 +39,15 @@ static void sigchld_handler(int val) int ret = 0; waitpid (child, &status, 0); - if (WIFEXITED(status) == 1) + if (WIFEXITED(status) != 0) { ret = WEXITSTATUS(status); printf("Test process exited with result %u\n", ret); } - if (WIFSIGNALED(status) == 1) + if (WIFSIGNALED(status) != 0) { - printf("Test process was signaled %u\n", WTERMSIG(status)); - ret = WTERMSIG(status); + ret = WTERMSIG(status); + printf("Test process was signaled %u\n", ret); } exit(ret); } -- cgit v1.2.3