patch-2.2.0-pre6 linux/arch/i386/kernel/process.c

Next file: linux/arch/i386/kernel/ptrace.c
Previous file: linux/arch/i386/kernel/entry.S
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.2.0-pre5/linux/arch/i386/kernel/process.c linux/arch/i386/kernel/process.c
@@ -781,6 +781,18 @@
 	return do_fork(clone_flags, newsp, &regs);
 }
 
+asmlinkage int sys_vfork(struct pt_regs regs)
+{
+	int     child;
+
+	child = do_fork(CLONE_VM | SIGCHLD, regs.esp, &regs);
+
+	if (child > 0)
+		sleep_on(&current->vfork_sleep);
+
+	return child;
+}
+
 /*
  * sys_execve() executes a new program.
  */

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov