vfork.c\process\src - musl - musl - an implementation of the standard library for Linux-based systems

index : musl
musl - an implementation of the standard library for Linux-based systems
summary refs log tree commit diff
path: root/src/process/vfork.c
blob: d430c13fca36b38ba8a16ed3d833c09ff70ef91f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#define _GNU_SOURCE
#include <unistd.h>
#include <signal.h>
#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
}
generated by cgit v1.2.1 (git 2.18.0) at 2025年09月08日 11:08:26 +0000

AltStyle によって変換されたページ (->オリジナル) /