All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH igt] core/sighelper: Send SIGUSR1 to everyone in the process group
Date: Thu,  7 Jan 2016 09:07:03 +0000	[thread overview]
Message-ID: <1452157623-25442-1-git-send-email-chris@chris-wilson.co.uk> (raw)

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(-)

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@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

             reply	other threads:[~2016-01-07  9:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-07  9:07 Chris Wilson [this message]
2016-01-07  9:14 ` [PATCH igt] core/sighelper: Send SIGUSR1 to everyone in the process group Chris Wilson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1452157623-25442-1-git-send-email-chris@chris-wilson.co.uk \
    --to=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.