=== modified file 'src/nsterm.m' --- src/nsterm.m 2014-04-04 16:32:24 +0000 +++ src/nsterm.m 2014-05-23 16:13:50 +0000 @@ -4427,7 +4427,7 @@ #ifdef NS_IMPL_GNUSTEP /* GNUstep steals SIGCHLD for use in NSTask, but we don't use NSTask. We must re-catch it so subprocess works. */ - catch_child_signal (); + catch_child_signal (false); #endif return dpyinfo; } === modified file 'src/process.c' --- src/process.c 2014-05-03 20:13:10 +0000 +++ src/process.c 2014-05-23 16:17:57 +0000 @@ -6254,7 +6254,7 @@ #ifdef NS_IMPL_GNUSTEP /* NSTask in GNUstep sets its child handler each time it is called. So we must re-set ours. */ - catch_child_signal(); + catch_child_signal (true); #endif } @@ -7062,16 +7062,18 @@ /* Arrange to catch SIGCHLD if this hasn't already been arranged. Invoke this after init_process_emacs, and after glib and/or GNUstep futz with the SIGCHLD handler, but before Emacs forks any children. - This function's caller should block SIGCHLD. */ + futz with the SIGCHLD handler, but before Emacs forks any children. + If ALREADY_BLOCKED, this function's caller has already blocked SIGCHLD. */ #ifndef NS_IMPL_GNUSTEP static #endif void -catch_child_signal (void) +catch_child_signal (bool already_blocked) { struct sigaction action, old_action; emacs_sigaction_init (&action, deliver_child_signal); + if (!already_blocked) block_child_signal (); sigaction (SIGCHLD, &action, &old_action); eassert (! (old_action.sa_flags & SA_SIGINFO)); @@ -7081,6 +7083,7 @@ = (old_action.sa_handler == SIG_DFL || old_action.sa_handler == SIG_IGN ? dummy_handler : old_action.sa_handler); + if (!already_blocked) unblock_child_signal (); } #endif /* subprocesses */ @@ -7107,7 +7110,7 @@ it into lib_child_handler. */ g_source_unref (g_child_watch_source_new (getpid ())); #endif - catch_child_signal (); + catch_child_signal (false); } FD_ZERO (&input_wait_mask); === modified file 'src/process.h' --- src/process.h 2014-01-01 07:43:34 +0000 +++ src/process.h 2014-05-23 16:12:58 +0000 @@ -241,7 +241,7 @@ extern void add_write_fd (int fd, fd_callback func, void *data); extern void delete_write_fd (int fd); #ifdef NS_IMPL_GNUSTEP -extern void catch_child_signal (void); +extern void catch_child_signal (bool); #endif #ifdef WINDOWSNT === modified file 'src/sysdep.c' --- src/sysdep.c 2014-04-16 13:27:28 +0000 +++ src/sysdep.c 2014-05-23 15:58:51 +0000 @@ -1515,6 +1515,12 @@ #ifdef PROFILER_CPU_SUPPORT sigaddset (&action->sa_mask, SIGPROF); #endif +#ifdef SIGUSR1 + sigaddset (&action->sa_mask, SIGUSR1); +#endif +#ifdef SIGUSR2 + sigaddset (&action->sa_mask, SIGUSR2); +#endif #ifdef SIGWINCH sigaddset (&action->sa_mask, SIGWINCH); #endif