patch-2.2.0-pre9 linux/arch/i386/kernel/process.c
Next file: linux/arch/i386/kernel/setup.c
Previous file: linux/arch/i386/kernel/irq.h
Back to the patch index
Back to the overall index
- Lines: 22
- Date:
Wed Jan 20 11:08:24 1999
- Orig file:
v2.2.0-pre8/linux/arch/i386/kernel/process.c
- Orig date:
Tue Jan 19 11:32:51 1999
diff -u --recursive --new-file v2.2.0-pre8/linux/arch/i386/kernel/process.c linux/arch/i386/kernel/process.c
@@ -785,6 +785,21 @@
}
/*
+ * This is trivial, and on the face of it looks like it
+ * could equally well be done in user mode.
+ *
+ * Not so, for quite unobvious reasons - register pressure.
+ * In user mode vfork() cannot have a stack frame, and if
+ * done by calling the "clone()" system call directly, you
+ * do not have enough call-clobbered registers to hold all
+ * the information you need.
+ */
+asmlinkage int sys_vfork(struct pt_regs regs)
+{
+ return do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, regs.esp, ®s);
+}
+
+/*
* sys_execve() executes a new program.
*/
asmlinkage int sys_execve(struct pt_regs regs)
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov