* main.c (init_sigchld): Disable subshell if SIGCHLD handler

cannot be installed.
This commit is contained in:
Pavel Roskin 2001-08-18 15:18:56 +00:00
parent 7d2df0889d
commit 5215df9192
2 changed files with 16 additions and 5 deletions

View File

@ -1,5 +1,8 @@
2001-08-18 Pavel Roskin <proski@gnu.org>
* main.c (init_sigchld): Disable subshell if SIGCHLD handler
cannot be installed.
* x.h: Instead of undefining MIX and MAX after <gnome.h> make
sure that <sys/param.h> is included before <gnome.h>.

View File

@ -2450,18 +2450,26 @@ init_sigchld (void)
sigchld_action.sa_handler =
#ifdef HAVE_SUBSHELL_SUPPORT
use_subshell ? sigchld_handler :
#endif
#endif /* HAVE_SUBSHELL_SUPPORT */
sigchld_handler_no_subshell;
sigemptyset (&sigchld_action.sa_mask);
#ifdef SA_RESTART
sigchld_action.sa_flags = SA_RESTART;
sigchld_action.sa_flags = SA_RESTART;
#else
sigchld_action.sa_flags = 0;
#endif
sigchld_action.sa_flags = 0;
#endif /* !SA_RESTART */
sigaction (SIGCHLD, &sigchld_action, NULL);
if (sigaction (SIGCHLD, &sigchld_action, NULL) == -1) {
#ifdef HAVE_SUBSHELL_SUPPORT
/*
* This may happen on QNX Neutrino 6, where SA_RESTART
* is defined but not implemented. Fallback to no subshell.
*/
use_subshell = 0;
#endif /* HAVE_SUBSHELL_SUPPORT */
}
}
#endif /* _OS_NT, __os2__, UNIX */