[PATCH] signal error return fix

Andries.Brouwer@cwi.nl
Tue, 11 Feb 2003 10:56:34 +0100 (MET)


diff -u --recursive --new-file -X /linux/dontdiff a/kernel/sys.c b/kernel/sys.c
--- a/kernel/sys.c Tue Feb 11 09:14:18 2003
+++ b/kernel/sys.c Tue Feb 11 10:13:26 2003
@@ -916,6 +916,7 @@
p = find_task_by_pid(pid);
if (!p)
goto out;
+
err = -EINVAL;
if (!thread_group_leader(p))
goto out;
@@ -927,11 +928,16 @@
err = -EACCES;
if (p->did_exec)
goto out;
- } else if (p != current)
- goto out;
+ } else {
+ err = -ESRCH;
+ if (p != current)
+ goto out;
+ }
+
err = -EPERM;
if (p->leader)
goto out;
+
if (pgid != pid) {
struct task_struct *p;
struct pid *pid;
-
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/