bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bug in bash 4.4-beta: suspending and restarting "man" program


From: Chet Ramey
Subject: Re: Bug in bash 4.4-beta: suspending and restarting "man" program
Date: Thu, 12 Nov 2015 08:32:24 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Thunderbird/38.3.0

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    address@hidden    http://cnswww.cns.cwru.edu/~chet/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]