[PATCH? 3/3] move daemonized kernel threads into the swapper's session

From: Oleg Nesterov
Date: Mon Nov 26 2007 - 09:25:43 EST


Any reason why daemonized kthread still uses 1,1 special pids? This patch
sets 0,0 pids, this matches kthread_create'ed threads.

Signed-off-by: Oleg Nesterov <oleg@xxxxxxxxxx>

--- PT/kernel/exit.c~3_daemonize_swapper 2007-11-26 16:47:35.000000000 +0300
+++ PT/kernel/exit.c 2007-11-26 17:10:41.000000000 +0300
@@ -390,7 +390,7 @@ void daemonize(const char *name, ...)
get_nsproxy(&init_nsproxy);
switch_task_namespaces(current, &init_nsproxy);
}
- set_special_pids(find_pid(1));
+ set_special_pids(&init_struct_pid);
proc_clear_tty(current);

/* Block and flush all signals */

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/