* src/callproc.c (emacs_spawn): Fix Mac OS X build.

This commit is contained in:
Po Lu 2022-08-06 10:27:03 +08:00
parent 4e091c8ddf
commit 15a9e73a17

View file

@ -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 ();