[Intel-gfx] [PATCH igt] core/sighelper: Send SIGUSR1 to everyone in the process group

Chris Wilson chris at chris-wilson.co.uk
Thu Jan 7 01:07:03 PST 2016


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 at chris-wilson.co.uk>
---
 lib/igt_aux.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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);
 	}
 }
-- 
2.7.0.rc3



More information about the Intel-gfx mailing list