summaryrefslogtreecommitdiffstats
path: root/kernel/exit.c
diff options
context:
space:
mode:
authorOren Laadan <orenl@cs.columbia.edu>2006-01-08 10:03:58 +0100
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-09 05:14:01 +0100
commite19f247a3dbd85485ec13174817ae9c2478fe541 (patch)
tree1d6f6fa28d70d51d1ce71264b07ec1afd768e9a6 /kernel/exit.c
parent[PATCH] setpgid: should work for sub-threads (diff)
downloadlinux-e19f247a3dbd85485ec13174817ae9c2478fe541.tar.xz
linux-e19f247a3dbd85485ec13174817ae9c2478fe541.zip
[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.c2
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)
void __set_special_pids(pid_t session, pid_t pgrp)
{
- struct task_struct *curr = current;
+ struct task_struct *curr = current->group_leader;
if (curr->signal->session != session) {
detach_pid(curr, PIDTYPE_SID);