lkml.org 
[lkml]   [2001]   [Dec]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Date
Subject[PATCH] kill(-1,sig)
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)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 13:14    [W:0.168 / U:0.324 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site