From: Andries.Brouwer@cwi.nl
To: torvalds@transmeta.com
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] kill(-1,sig)
Date: Fri, 14 Dec 2001 17:34:48 GMT [thread overview]
Message-ID: <UTC200112141734.RAA20953.aeb@cwi.nl> (raw)
The new POSIX 1003.1-2001 is explicit about what kill(-1,sig)
is supposed to do. Maybe we should follow it.
Andries
--- signal.c~ Thu Nov 22 01:26:27 2001
+++ signal.c Fri Dec 14 18:27:34 2001
@@ -649,8 +649,10 @@
/*
* kill_something_info() interprets pid in interesting ways just like kill(2).
*
- * POSIX specifies that kill(-1,sig) is unspecified, but what we have
- * is probably wrong. Should make it like BSD or SYSV.
+ * POSIX (2001) specifies "If pid is -1, sig shall be sent to all processes
+ * (excluding an unspecified set of system processes) for which the process
+ * has permission to send that signal."
+ * So, probably the process should also signal itself.
*/
static int kill_something_info(int sig, struct siginfo *info, int pid)
@@ -663,7 +665,7 @@
read_lock(&tasklist_lock);
for_each_task(p) {
- if (p->pid > 1 && p != current) {
+ if (p->pid > 1) {
int err = send_sig_info(sig, info, p);
++count;
if (err != -EPERM)
next reply other threads:[~2001-12-14 17:35 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-12-14 17:34 Andries.Brouwer [this message]
2001-12-14 20:25 ` [PATCH] kill(-1,sig) Linus Torvalds
2001-12-17 9:34 ` Chris Wright
2001-12-17 14:41 ` vda
2001-12-17 11:53 ` Sean Hunter
2001-12-17 12:06 ` Matthew Kirkwood
2001-12-17 12:30 ` Sean Hunter
2001-12-17 12:16 ` Miquel van Smoorenburg
2001-12-17 16:06 ` vda
2001-12-14 20:36 ` Simon Kirby
2001-12-14 20:40 ` Linus Torvalds
2001-12-14 20:49 ` Simon Kirby
2001-12-15 10:19 ` Albert D. Cahalan
2001-12-15 14:03 ` Martin Josefsson
2001-12-15 23:09 ` Simon Kirby
2001-12-16 8:26 ` Albert D. Cahalan
2001-12-17 8:50 ` Helge Hafting
2001-12-17 20:51 ` Udo A. Steinberg
2001-12-17 21:13 ` Linus Torvalds
2001-12-17 22:06 ` Richard B. Johnson
2001-12-18 17:27 ` Alan Cox
-- strict thread matches above, loose matches on Subject: below --
2001-12-14 21:22 Andries.Brouwer
2001-12-17 7:01 Richard Gooch
2001-12-17 11:41 ` vda
2001-12-17 16:41 ` Richard Gooch
2001-12-17 23:38 Andries.Brouwer
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=UTC200112141734.RAA20953.aeb@cwi.nl \
--to=andries.brouwer@cwi.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox