aboutsummaryrefslogtreecommitdiffstats
path: root/src/process.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/process.c')
-rw-r--r--src/process.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/process.c b/src/process.c
index c30173955d2..2a1c2eecde3 100644
--- a/src/process.c
+++ b/src/process.c
@@ -2051,11 +2051,16 @@ create_process (Lisp_Object process, char **new_argv, Lisp_Object current_dir)
2051 2051
2052#ifdef DARWIN_OS 2052#ifdef DARWIN_OS
2053 /* Darwin doesn't let us run setsid after a vfork, so use fork when 2053 /* Darwin doesn't let us run setsid after a vfork, so use fork when
2054 necessary. */ 2054 necessary. Also, reset SIGCHLD handling after a vfork, as
2055 apparently macOS can mistakenly deliver SIGCHLD to the child. */
2055 if (pty_flag) 2056 if (pty_flag)
2056 pid = fork (); 2057 pid = fork ();
2057 else 2058 else
2058 pid = vfork (); 2059 {
2060 pid = vfork ();
2061 if (pid == 0)
2062 signal (SIGCHLD, SIG_DFL);
2063 }
2059#else 2064#else
2060 pid = vfork (); 2065 pid = vfork ();
2061#endif 2066#endif