X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fprocess%2Fvfork.c;h=d430c13fca36b38ba8a16ed3d833c09ff70ef91f;hb=e0b17ef81eee66cafc22129de34b7efbfee57b31;hp=a7dd86c82775bf42d284bb71e64390134f5ca616;hpb=aa398f56fa398f2202b04e82c67f822f3233786f;p=musl diff --git a/src/process/vfork.c b/src/process/vfork.c index a7dd86c8..d430c13f 100644 --- a/src/process/vfork.c +++ b/src/process/vfork.c @@ -1,8 +1,14 @@ +#define _GNU_SOURCE #include +#include #include "syscall.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 }