On 11/11/15 6:16 PM, Keith Thompson wrote:
> Yeah, that's fine. I will modify bash to set the original signal
> dispositions to SIG_DFL in interactive shells.
>
>
> Does that mean reverting default_tty_job_signals() in jobs.h to the
> version in bash 4.3.30:
>
> set_signal_handler (SIGTSTP, SIG_DFL);
> set_signal_handler (SIGTTIN, SIG_DFL);
> set_signal_handler (SIGTTOU, SIG_DFL);
>
> or is there more to it than that? (I'd like to try out the change myself.)
No. It means forcing the original signal disposition to SIG_DFL for the
tty-generated job control signals when the shell is interactive:
/* Called once in a parent process. */
void
get_original_tty_job_signals ()
{
static int fetched = 0;
if (fetched == 0)
{
if (interactive_shell)
{
set_original_signal (SIGTSTP, SIG_DFL);
set_original_signal (SIGTTIN, SIG_DFL);
set_original_signal (SIGTTOU, SIG_DFL);
}
else
{
get_original_signal (SIGTSTP);
get_original_signal (SIGTTIN);
get_original_signal (SIGTTOU);
}
fetched = 1;
}
}
You can use your change, if it works for you, but it just reverts the
bug the bash-4.4 change fixes.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU [email protected] http://cnswww.cns.cwru.edu/~chet/