summaryrefslogtreecommitdiffstats
path: root/src/xspawn.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/xspawn.c')
-rw-r--r--src/xspawn.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/xspawn.c b/src/xspawn.c
index 68973ad..789f370 100644
--- a/src/xspawn.c
+++ b/src/xspawn.c
@@ -612,7 +612,11 @@ static pid_t bfs_fork_spawn(struct bfs_resolver *res, const struct bfs_spawn *ct
goto fail;
}
+#if BFS_HAS__FORK
+ pid_t pid = _Fork();
+#else
pid_t pid = fork();
+#endif
if (pid == 0) {
// Child
bfs_spawn_exec(res, ctx, argv, envp, pipefd);