patch-2.1.96 linux/kernel/kmod.c
Next file: linux/kernel/printk.c
Previous file: linux/kernel/fork.c
Back to the patch index
Back to the overall index
-  Lines: 14
-  Date:
Mon Apr 13 18:11:38 1998
-  Orig file: 
v2.1.95/linux/kernel/kmod.c
-  Orig date: 
Wed Apr  8 19:36:29 1998
diff -u --recursive --new-file v2.1.95/linux/kernel/kmod.c linux/kernel/kmod.c
@@ -108,7 +108,12 @@
 {
 	printk("Starting kmod\n");
 
-	kernel_thread(kmod_thread, NULL, 0);
+	/*
+	 * CLONE_FS means that our "cwd" will follow that of init.
+	 * CLONE_FILES just saves some space (we don't need any
+	 * new file descriptors). Ditto for CLONE_SIGHAND.
+	 */
+	kernel_thread(kmod_thread, NULL, CLONE_FILES | CLONE_FS | CLONE_SIGHAND);
 
 	kmod_unload_timer.next = NULL;
 	kmod_unload_timer.prev = NULL;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov