diff options
Diffstat (limited to 'powerpc/harness.c')
-rw-r--r-- | powerpc/harness.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/powerpc/harness.c b/powerpc/harness.c index 8ebc58a..e80c42a 100644 --- a/powerpc/harness.c +++ b/powerpc/harness.c @@ -30,15 +30,12 @@ int run_test(int (test_function)(void), char *name) pid = fork(); if (pid == 0) { - setpgid(0, 0); exit(test_function()); } else if (pid == -1) { perror("fork"); return 1; } - setpgid(pid, pid); - /* Wake us up in timeout seconds */ alarm(TIMEOUT); terminated = false; @@ -53,20 +50,17 @@ wait: if (terminated) { printf("!! force killing %s\n", name); - kill(-pid, SIGKILL); + kill(pid, SIGKILL); return 1; } else { printf("!! killing %s\n", name); - kill(-pid, SIGTERM); + kill(pid, SIGTERM); terminated = true; alarm(KILL_TIMEOUT); goto wait; } } - /* Kill anything else in the process group that is still running */ - kill(-pid, SIGTERM); - if (WIFEXITED(status)) status = WEXITSTATUS(status); else { @@ -105,10 +99,7 @@ int test_harness(int (test_function)(void), char *name) rc = run_test(test_function, name); - if (rc == MAGIC_SKIP_RETURN_VALUE) - test_skip(name); - else - test_finish(name, rc); + test_finish(name, rc); return rc; } |