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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxx>
---
 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

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux