summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/forkfd/forkfd_linux.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/forkfd/forkfd_linux.c')
-rw-r--r--src/3rdparty/forkfd/forkfd_linux.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/3rdparty/forkfd/forkfd_linux.c b/src/3rdparty/forkfd/forkfd_linux.c
index 87acdc3341..c4f723343f 100644
--- a/src/3rdparty/forkfd/forkfd_linux.c
+++ b/src/3rdparty/forkfd/forkfd_linux.c
@@ -147,7 +147,10 @@ int system_forkfd(int flags, pid_t *ppid, int *system)
}
*system = 1;
- pid = sys_clone(CLONE_PIDFD, &pidfd);
+ unsigned long cloneflags = CLONE_PIDFD;
+ if (flags & FFD_VFORK_SEMANTICS)
+ cloneflags |= CLONE_VFORK;
+ pid = sys_clone(cloneflags, &pidfd);
if (ppid)
*ppid = pid;