summaryrefslogtreecommitdiff
path: root/libc
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2003-06-03 19:13:14 +0000
committerEric Andersen <andersen@codepoet.org>2003-06-03 19:13:14 +0000
commit6679351d8445ea112b8af513ad87ffe11dc93fb8 (patch)
tree70e307c65a9a2be68bd54a08e79b1214862ead86 /libc
parent8abd6b1f7e011ca4d75063a685d0aa2e138adb17 (diff)
Kill the runtime fallback to fork and make it be compile time
Diffstat (limited to 'libc')
-rw-r--r--libc/sysdeps/linux/i386/vfork.S28
1 files changed, 9 insertions, 19 deletions
diff --git a/libc/sysdeps/linux/i386/vfork.S b/libc/sysdeps/linux/i386/vfork.S
index c7002f189..d340a983d 100644
--- a/libc/sysdeps/linux/i386/vfork.S
+++ b/libc/sysdeps/linux/i386/vfork.S
@@ -1,8 +1,5 @@
/*
- * June 27, 2001 Manuel Novoa III
- *
- * Modified to (hopefully) be PIC and REENTRANT safe.
- * Modified again to better follow the glibc implementation.
+ * June 3, 2003 Erik Andersen
*
*/
@@ -10,30 +7,24 @@
#include <bits/errno.h>
#include <sys/syscall.h>
+#ifndef __NR_vfork
+
+/* No vfork so use fork instead */
+.weak vfork ; vfork = __libc_fork
+
+#else
+
.text
.globl __vfork;
.type __vfork,@function;
.align 1<<4;
__vfork:
-#ifdef __NR_vfork
popl %ecx
movl $__NR_vfork,%eax
int $0x80
pushl %ecx
cmpl $-4095,%eax
- jae .Lerror
- ret
-
-.Lerror:
- cmpl $-ENOSYS,%eax
- jne __syscall_error
-#endif
-
- /* Fall back on calling fork */
- movl $__NR_fork,%eax
- int $0x80
- cmpl $-4095,%eax
jae __syscall_error
ret
@@ -59,5 +50,4 @@ __syscall_error:
.weak vfork ; vfork = __vfork
-
-
+#endif