this was added so that posix_spawn and possibly other functionality
could be implemented in terms of vfork, but that turned out to be
unsafe. any such usage needs __clone with proper handling of stack
lifetime.
.syntax unified
-.global __vfork
-.weak vfork
-.type __vfork,%function
+.global vfork
.type vfork,%function
-__vfork:
vfork:
mov ip, r7
mov r7, 190
-.global __vfork
-.weak vfork
-.type __vfork,@function
+.global vfork
.type vfork,@function
-__vfork:
vfork:
pop %edx
mov $190,%eax
- .global __vfork
- .weak vfork
- .type __vfork,%function
+ .global vfork
.type vfork,%function
-__vfork:
vfork:
svc 190
.hidden __syscall_ret
-.global __vfork
-.weak vfork
-.type __vfork,@function
+.global vfork
.type vfork,@function
-__vfork:
vfork:
mov #95, r3
add r3, r3
#include <unistd.h>
#include <signal.h>
#include "syscall.h"
-#include "libc.h"
-pid_t __vfork(void)
+pid_t vfork(void)
{
/* vfork syscall cannot be made from C code */
#ifdef SYS_fork
return syscall(SYS_clone, SIGCHLD, 0);
#endif
}
-
-weak_alias(__vfork, vfork);
-.global __vfork
-.weak vfork
-.type __vfork,@function
+.global vfork
.type vfork,@function
-__vfork:
vfork:
pop %rdx
mov $0x4000003a,%eax /* SYS_vfork */
-.global __vfork
-.weak vfork
-.type __vfork,@function
+.global vfork
.type vfork,@function
-__vfork:
vfork:
pop %rdx
mov $58,%eax