diff options
author | Rich Felker <dalias@aerifal.cx> | 2018-09-11 15:26:51 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2018-09-12 14:34:37 -0400 |
commit | ced75472d7e3d73d5b057e36ccbc7b7fcba95104 (patch) | |
tree | 24365904fae978a92f48fcb93977eedb900aa419 /src | |
parent | 6d47488e8616dfc24e58aeb56db520ac7c80421e (diff) | |
download | musl-ced75472d7e3d73d5b057e36ccbc7b7fcba95104.zip musl-ced75472d7e3d73d5b057e36ccbc7b7fcba95104.tar.gz musl-ced75472d7e3d73d5b057e36ccbc7b7fcba95104.tar.bz2 |
remove __vfork alias
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/process/arm/vfork.s | 5 | ||||
-rw-r--r-- | src/process/i386/vfork.s | 5 | ||||
-rw-r--r-- | src/process/s390x/vfork.s | 5 | ||||
-rw-r--r-- | src/process/sh/vfork.s | 5 | ||||
-rw-r--r-- | src/process/vfork.c | 5 | ||||
-rw-r--r-- | src/process/x32/vfork.s | 5 | ||||
-rw-r--r-- | src/process/x86_64/vfork.s | 5 |
7 files changed, 7 insertions, 28 deletions
diff --git a/src/process/arm/vfork.s b/src/process/arm/vfork.s index ed1f87a..d7ec41b 100644 --- a/src/process/arm/vfork.s +++ b/src/process/arm/vfork.s @@ -1,9 +1,6 @@ .syntax unified -.global __vfork -.weak vfork -.type __vfork,%function +.global vfork .type vfork,%function -__vfork: vfork: mov ip, r7 mov r7, 190 diff --git a/src/process/i386/vfork.s b/src/process/i386/vfork.s index a3d76ae..3d0e6d6 100644 --- a/src/process/i386/vfork.s +++ b/src/process/i386/vfork.s @@ -1,8 +1,5 @@ -.global __vfork -.weak vfork -.type __vfork,@function +.global vfork .type vfork,@function -__vfork: vfork: pop %edx mov $190,%eax diff --git a/src/process/s390x/vfork.s b/src/process/s390x/vfork.s index 2fb4022..744f9d7 100644 --- a/src/process/s390x/vfork.s +++ b/src/process/s390x/vfork.s @@ -1,8 +1,5 @@ - .global __vfork - .weak vfork - .type __vfork,%function + .global vfork .type vfork,%function -__vfork: vfork: svc 190 .hidden __syscall_ret diff --git a/src/process/sh/vfork.s b/src/process/sh/vfork.s index 48cc939..91dbde7 100644 --- a/src/process/sh/vfork.s +++ b/src/process/sh/vfork.s @@ -1,8 +1,5 @@ -.global __vfork -.weak vfork -.type __vfork,@function +.global vfork .type vfork,@function -__vfork: vfork: mov #95, r3 add r3, r3 diff --git a/src/process/vfork.c b/src/process/vfork.c index ac95465..d430c13 100644 --- a/src/process/vfork.c +++ b/src/process/vfork.c @@ -2,9 +2,8 @@ #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 @@ -13,5 +12,3 @@ pid_t __vfork(void) return syscall(SYS_clone, SIGCHLD, 0); #endif } - -weak_alias(__vfork, vfork); diff --git a/src/process/x32/vfork.s b/src/process/x32/vfork.s index 8df0058..0f0ca3e 100644 --- a/src/process/x32/vfork.s +++ b/src/process/x32/vfork.s @@ -1,8 +1,5 @@ -.global __vfork -.weak vfork -.type __vfork,@function +.global vfork .type vfork,@function -__vfork: vfork: pop %rdx mov $0x4000003a,%eax /* SYS_vfork */ diff --git a/src/process/x86_64/vfork.s b/src/process/x86_64/vfork.s index 2cad805..9114439 100644 --- a/src/process/x86_64/vfork.s +++ b/src/process/x86_64/vfork.s @@ -1,8 +1,5 @@ -.global __vfork -.weak vfork -.type __vfork,@function +.global vfork .type vfork,@function -__vfork: vfork: pop %rdx mov $58,%eax |