Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #11871

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

From Chet Ramey <chet.ramey@case.edu>
Newsgroups gnu.bash.bug
Subject Re: Bug in bash 4.4-beta: suspending and restarting "man" program
Date 2015-11-12 08:32 -0500
Message-ID <mailman.2158.1447335155.7904.bug-bash@gnu.org> (permalink)
References (12 earlier) <87vb99bjq1.fsf@igel.home> <CAAHpriOu_PMpst0YmGBEpr=iVig6tkS+-s0kbcJe_9pBSS1Amg@mail.gmail.com> <CAAHpriOCaLUSmsfOdS=d4redjH6CWoTJo=rPPXxQ+dAT7CtLZA@mail.gmail.com> <56439D2E.7020001@case.edu> <CAAHpriNAUiYRdQrzESQ5s5_Q8MdGVp3oEUNaf7nkb6ge3Z0Eqg@mail.gmail.com>

Show all headers | View raw


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

Back to gnu.bash.bug | Previous | Next | Find similar | Unroll thread


Thread

Re: Bug in bash 4.4-beta: suspending and restarting "man" program Chet Ramey <chet.ramey@case.edu> - 2015-11-12 08:32 -0500

csiph-web