diff options
author | Oren Laadan <orenl@cs.columbia.edu> | 2006-01-08 04:03:58 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-08 23:14:01 -0500 |
commit | e19f247a3dbd85485ec13174817ae9c2478fe541 (patch) | |
tree | 1d6f6fa28d70d51d1ce71264b07ec1afd768e9a6 /kernel/exit.c | |
parent | ee0acf90d320c29916ba8c5c1b2e908d81f5057d (diff) |
[PATCH] setpgid: should work for sub-threads
setsid() does not work unless the calling process is a
thread_group_leader().
'man setpgid' does not tell anything about that, so I consider this
behaviour is a bug.
Signed-off-by: Oren Laadan <orenl@cs.columbia.edu>
Cc: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Roland McGrath <roland@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel/exit.c')
-rw-r--r-- | kernel/exit.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/exit.c b/kernel/exit.c index a80824f6108b..caceabf3f230 100644 --- a/kernel/exit.c +++ b/kernel/exit.c | |||
@@ -257,7 +257,7 @@ static inline void reparent_to_init(void) | |||
257 | 257 | ||
258 | void __set_special_pids(pid_t session, pid_t pgrp) | 258 | void __set_special_pids(pid_t session, pid_t pgrp) |
259 | { | 259 | { |
260 | struct task_struct *curr = current; | 260 | struct task_struct *curr = current->group_leader; |
261 | 261 | ||
262 | if (curr->signal->session != session) { | 262 | if (curr->signal->session != session) { |
263 | detach_pid(curr, PIDTYPE_SID); | 263 | detach_pid(curr, PIDTYPE_SID); |