diff options
Diffstat (limited to 'kernel/sys.c')
-rw-r--r-- | kernel/sys.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/kernel/sys.c b/kernel/sys.c index c72311324ea7..c0a58be780a4 100644 --- a/kernel/sys.c +++ b/kernel/sys.c | |||
@@ -895,8 +895,7 @@ SYSCALL_DEFINE1(times, struct tms __user *, tbuf) | |||
895 | * only important on a multi-user system anyway, to make sure one user | 895 | * only important on a multi-user system anyway, to make sure one user |
896 | * can't send a signal to a process owned by another. -TYT, 12/12/91 | 896 | * can't send a signal to a process owned by another. -TYT, 12/12/91 |
897 | * | 897 | * |
898 | * Auch. Had to add the 'did_exec' flag to conform completely to POSIX. | 898 | * !PF_FORKNOEXEC check to conform completely to POSIX. |
899 | * LBT 04.03.94 | ||
900 | */ | 899 | */ |
901 | SYSCALL_DEFINE2(setpgid, pid_t, pid, pid_t, pgid) | 900 | SYSCALL_DEFINE2(setpgid, pid_t, pid, pid_t, pgid) |
902 | { | 901 | { |
@@ -932,7 +931,7 @@ SYSCALL_DEFINE2(setpgid, pid_t, pid, pid_t, pgid) | |||
932 | if (task_session(p) != task_session(group_leader)) | 931 | if (task_session(p) != task_session(group_leader)) |
933 | goto out; | 932 | goto out; |
934 | err = -EACCES; | 933 | err = -EACCES; |
935 | if (p->did_exec) | 934 | if (!(p->flags & PF_FORKNOEXEC)) |
936 | goto out; | 935 | goto out; |
937 | } else { | 936 | } else { |
938 | err = -ESRCH; | 937 | err = -ESRCH; |
@@ -1572,8 +1571,7 @@ static void k_getrusage(struct task_struct *p, int who, struct rusage *r) | |||
1572 | t = p; | 1571 | t = p; |
1573 | do { | 1572 | do { |
1574 | accumulate_thread_rusage(t, r); | 1573 | accumulate_thread_rusage(t, r); |
1575 | t = next_thread(t); | 1574 | } while_each_thread(p, t); |
1576 | } while (t != p); | ||
1577 | break; | 1575 | break; |
1578 | 1576 | ||
1579 | default: | 1577 | default: |