This is the mail archive of the libc-hacker@cygnus.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: too early, no vfork


Linus Torvalds <torvalds@transmeta.com> writes:

> If somebody sends me a patch, and promises to God it has been tested, I
> will include it.

The patch below is tested.  I'm using it in the kernel I'm running
right now and the vfork implementation I had yesterday uses it.  With
all this the glibc test suite passes again.  (Note that unistd.h still
has the syscall number.)

-- 
---------------.      drepper at gnu.org  ,-.   1325 Chesapeake Terrace
Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
Cygnus Solutions `--' drepper at cygnus.com   `------------------------

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--- arch/i386/kernel/entry.S-save	Tue Jan 19 18:18:33 1999
+++ arch/i386/kernel/entry.S	Tue Jan 19 18:21:19 1999
@@ -559,7 +559,7 @@
 	.long SYMBOL_NAME(sys_sendfile)
 	.long SYMBOL_NAME(sys_ni_syscall)		/* streams1 */
 	.long SYMBOL_NAME(sys_ni_syscall)		/* streams2 */
-	.long SYMBOL_NAME(sys_ni_syscall)            /* 190 */
+	.long SYMBOL_NAME(sys_vfork)            /* 190 */
 
 	/*
 	 * NOTE!! This doesn't have to be exact - we just have
--- arch/i386/kernel/process.c-save	Tue Jan 19 18:16:42 1999
+++ arch/i386/kernel/process.c	Tue Jan 19 18:17:41 1999
@@ -784,6 +784,11 @@
 	return do_fork(clone_flags, newsp, &regs);
 }
 
+asmlinkage int sys_vfork(struct pt_regs regs)
+{
+	return do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, regs.esp, &regs);
+}
+
 /*
  * sys_execve() executes a new program.
  */


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]