[PATCH] signal error return fix

From: Andries.Brouwer@cwi.nl
Date: Tue Feb 11 2003 - 04:56:34 EST


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/



This archive was generated by hypermail 2b29 : Sat Feb 15 2003 - 22:00:32 EST