Message ID | 1452157623-25442-1-git-send-email-chris@chris-wilson.co.uk (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Thu, Jan 07, 2016 at 09:07:03AM +0000, Chris Wilson wrote: > Some stress tests create both the signal helper and a lot of competing > processes. In these tests, the parent is just waiting upon the children, > and the intention is not to keep waking up the waiting parent, but to > keep interrupting the children (as we hope to trigger races in our > kernel code). raise(-pid) sends the signal to all members of the process s/raise/kill/ oops. > group, not just the target pid. -Chris
diff --git a/lib/igt_aux.c b/lib/igt_aux.c index 4d08d68..771bacb 100644 --- a/lib/igt_aux.c +++ b/lib/igt_aux.c @@ -79,7 +79,7 @@ static void __attribute__((noreturn)) signal_helper_process(pid_t pid) /* Interrupt the parent process at 500Hz, just to be annoying */ while (1) { usleep(1000 * 1000 / 500); - if (kill(pid, SIGUSR1)) /* Parent has died, so must we. */ + if (kill(-pid, SIGUSR1)) /* Parent has died, so must we. */ exit(0); } }
Some stress tests create both the signal helper and a lot of competing processes. In these tests, the parent is just waiting upon the children, and the intention is not to keep waking up the waiting parent, but to keep interrupting the children (as we hope to trigger races in our kernel code). raise(-pid) sends the signal to all members of the process group, not just the target pid. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> --- lib/igt_aux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)