diff options
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/timeout_watchdog.c | 8 |
1 files changed, 4 insertions, 4 deletions
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) | |||
39 | int ret = 0; | 39 | int ret = 0; |
40 | 40 | ||
41 | waitpid (child, &status, 0); | 41 | waitpid (child, &status, 0); |
42 | if (WIFEXITED(status) == 1) | 42 | if (WIFEXITED(status) != 0) |
43 | { | 43 | { |
44 | ret = WEXITSTATUS(status); | 44 | ret = WEXITSTATUS(status); |
45 | printf("Test process exited with result %u\n", ret); | 45 | printf("Test process exited with result %u\n", ret); |
46 | } | 46 | } |
47 | if (WIFSIGNALED(status) == 1) | 47 | if (WIFSIGNALED(status) != 0) |
48 | { | 48 | { |
49 | printf("Test process was signaled %u\n", WTERMSIG(status)); | 49 | ret = WTERMSIG(status); |
50 | ret = WTERMSIG(status); | 50 | printf("Test process was signaled %u\n", ret); |
51 | } | 51 | } |
52 | exit(ret); | 52 | exit(ret); |
53 | } | 53 | } |