X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=kernel%2Fsys.c;h=c0a58be780a407a5bf350e852db1c9800c98dd34;hb=fe9ea91cde29125a3417890678f4d886cec4a71e;hp=c72311324ea76ef2c9ae9514d2a30e4aa7c4be66;hpb=825e587af2e90e9b953849f3347a01d8f383d577;p=~andy%2Flinux diff --git a/kernel/sys.c b/kernel/sys.c index c72311324ea..c0a58be780a 100644 --- a/kernel/sys.c +++ b/kernel/sys.c @@ -895,8 +895,7 @@ SYSCALL_DEFINE1(times, struct tms __user *, tbuf) * only important on a multi-user system anyway, to make sure one user * can't send a signal to a process owned by another. -TYT, 12/12/91 * - * Auch. Had to add the 'did_exec' flag to conform completely to POSIX. - * LBT 04.03.94 + * !PF_FORKNOEXEC check to conform completely to POSIX. */ SYSCALL_DEFINE2(setpgid, pid_t, pid, pid_t, pgid) { @@ -932,7 +931,7 @@ SYSCALL_DEFINE2(setpgid, pid_t, pid, pid_t, pgid) if (task_session(p) != task_session(group_leader)) goto out; err = -EACCES; - if (p->did_exec) + if (!(p->flags & PF_FORKNOEXEC)) goto out; } else { err = -ESRCH; @@ -1572,8 +1571,7 @@ static void k_getrusage(struct task_struct *p, int who, struct rusage *r) t = p; do { accumulate_thread_rusage(t, r); - t = next_thread(t); - } while (t != p); + } while_each_thread(p, t); break; default: