diff options
Diffstat (limited to 'libc/sysdeps/linux/i386/vfork.S')
-rw-r--r-- | libc/sysdeps/linux/i386/vfork.S | 28 |
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 |