]> git.eshelyaron.com Git - emacs.git/commitdiff
Work around macOS bug with vforked child
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 21 May 2017 08:46:44 +0000 (01:46 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 21 May 2017 08:47:31 +0000 (01:47 -0700)
* src/callproc.c (call_process) [DARWIN_OS]:
Include workaround for apparent macOS bug.

src/callproc.c

index 7c85eed835fdf2542f75d971376ad9b13830a2f1..4cec02be7ef844cbab82972dd43217dabd8f2871 100644 (file)
@@ -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