emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master cb6d669 2/2: Work around macOS bug with vforked chi


From: Paul Eggert
Subject: [Emacs-diffs] master cb6d669 2/2: Work around macOS bug with vforked child
Date: Sun, 21 May 2017 04:47:38 -0400 (EDT)

branch: master
commit cb6d66974416f535fefb42c974b73037e257399a
Author: Paul Eggert <address@hidden>
Commit: Paul Eggert <address@hidden>

    Work around macOS bug with vforked child
    
    * src/callproc.c (call_process) [DARWIN_OS]:
    Include workaround for apparent macOS bug.
---
 src/callproc.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/callproc.c b/src/callproc.c
index 7c85eed..4cec02b 100644
--- a/src/callproc.c
+++ b/src/callproc.c
@@ -631,6 +631,14 @@ call_process (ptrdiff_t nargs, Lisp_Object *args, int 
filefd,
 
   if (pid == 0)
     {
+#ifdef DARWIN_OS
+      /* Work around a macOS bug, where SIGCHLD is apparently
+        delivered to a vforked child instead of to its parent.  See:
+        http://lists.gnu.org/archive/html/emacs-devel/2017-05/msg00342.html
+      */
+      signal (SIGCHLD, SIG_DFL);
+#endif
+
       unblock_child_signal (&oldset);
 
 #ifdef DARWIN_OS



reply via email to

[Prev in Thread] Current Thread [Next in Thread]