repo.or.cz
/
musl.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
fix misleading comment in strstr
[musl.git]
/
src
/
process
/
vfork.c
blob
d430c13fca36b38ba8a16ed3d833c09ff70ef91f
1
#define _GNU_SOURCE
2
#include <unistd.h>
3
#include <signal.h>
4
#include
"syscall.h"
5
6
pid_t
vfork
(
void
)
7
{
8
/* vfork syscall cannot be made from C code */
9
#ifdef SYS_fork
10
return
syscall
(
SYS_fork
);
11
#else
12
return
syscall
(
SYS_clone
,
SIGCHLD
,
0
);
13
#endif
14
}