summaryrefslogtreecommitdiffstats
path: root/kernel/exit.c
diff options
context:
space:
mode:
authorOren Laadan <orenl@cs.columbia.edu>2006-01-08 01:03:58 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-08 20:14:01 -0800
commite19f247a3dbd85485ec13174817ae9c2478fe541 (patch)
tree1d6f6fa28d70d51d1ce71264b07ec1afd768e9a6 /kernel/exit.c
parentee0acf90d320c29916ba8c5c1b2e908d81f5057d (diff)
downloadkernel-crypto-e19f247a3dbd85485ec13174817ae9c2478fe541.tar.gz
kernel-crypto-e19f247a3dbd85485ec13174817ae9c2478fe541.tar.xz
kernel-crypto-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 a80824f6108..caceabf3f23 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);