X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fprocess%2Fvfork.c;h=ac954651b70167cf62fcc498fb34672a0680e384;hb=ecc082c61b6da9a8b2ae0c07aa3331673834d94a;hp=16d07ea70598228668cfa68446d84e33b74123e3;hpb=768f39a535e5f5a50c2c17dc072e92ba01665ef0;p=musl diff --git a/src/process/vfork.c b/src/process/vfork.c index 16d07ea7..ac954651 100644 --- a/src/process/vfork.c +++ b/src/process/vfork.c @@ -1,11 +1,17 @@ +#define _GNU_SOURCE #include +#include #include "syscall.h" #include "libc.h" pid_t __vfork(void) { /* vfork syscall cannot be made from C code */ +#ifdef SYS_fork return syscall(SYS_fork); +#else + return syscall(SYS_clone, SIGCHLD, 0); +#endif } weak_alias(__vfork, vfork);