mirror of
https://github.com/MidnightCommander/mc
synced 2025-02-25 03:34:21 +03:00
* main.c (init_sigchld): Disable subshell if SIGCHLD handler
cannot be installed.
This commit is contained in:
parent
7d2df0889d
commit
5215df9192
@ -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>.
|
||||
|
||||
|
18
src/main.c
18
src/main.c
@ -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 */
|
||||
|
Loading…
x
Reference in New Issue
Block a user