From 15a9e73a1793a61b87d3f460e2e4bc5b7df1e6a8 Mon Sep 17 00:00:00 2001 From: Po Lu Date: Sat, 6 Aug 2022 10:27:03 +0800 Subject: [PATCH] * src/callproc.c (emacs_spawn): Fix Mac OS X build. --- src/callproc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/callproc.c b/src/callproc.c index aec0a2f5a58..e8e4c48b5be 100644 --- a/src/callproc.c +++ b/src/callproc.c @@ -1488,7 +1488,7 @@ emacs_spawn (pid_t *newpid, int std_in, int std_out, int std_err, /* Darwin doesn't let us run setsid after a vfork, so use fork when necessary. Below, we reset SIGCHLD handling after a vfork, as apparently macOS can mistakenly deliver SIGCHLD to the child. */ - if (pty != NULL) + if (pty_in || pty_out) pid = fork (); else pid = VFORK (); -- 2.39.2