aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/exit.c
diff options
context:
space:
mode:
authorOleg Nesterov <oleg@tv-sign.ru>2008-02-08 07:19:10 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-08 12:22:27 -0500
commit297bd42b15daed02453ff59ce6d31216a58b0398 (patch)
tree4b1fecc6e285c50d55961ed85e013419f5810164 /kernel/exit.c
parent8520d7c7f8611216e3b270becec95bb35b6899d4 (diff)
move daemonized kernel threads into the swapper's session
Daemonized kernel threads run in the init's session. This doesn't match the behaviour of kthread_create()'ed threads, and this is one of the 2 reasons why we need a special hack in sys_setsid(). Now that set_special_pids() was changed to use struct pid, not pid_t, we can use init_struct_pid and set 0,0 special pids. Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru> Acked-by: "Eric W. Biederman" <ebiederm@xmission.com> Cc: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.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 96716fd22373..d7815f570882 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -388,7 +388,7 @@ void daemonize(const char *name, ...)
388 get_nsproxy(&init_nsproxy); 388 get_nsproxy(&init_nsproxy);
389 switch_task_namespaces(current, &init_nsproxy); 389 switch_task_namespaces(current, &init_nsproxy);
390 } 390 }
391 set_special_pids(find_pid(1)); 391 set_special_pids(&init_struct_pid);
392 proc_clear_tty(current); 392 proc_clear_tty(current);
393 393
394 /* Block and flush all signals */ 394 /* Block and flush all signals */