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: Keith Thompson
Subject: Re: Bug in bash 4.4-beta: suspending and restarting "man" program
Date: Tue, 10 Nov 2015 11:15:24 -0800

But there's still a mystery here. Why does it behave differently under rxvt vs. xterm,
and why does that difference show up in bash 4.4-beta but not in 4.3.30?
(Both versions of bash are built from source on the same system.)

Running bash 4.3.30 under either xterm 261 or rxvt v2.6.4, I get:

bash-4.3$ trap
trap -- '' SIGTSTP
trap -- '' SIGTTIN
trap -- '' SIGTTOU

and Ctrl-Z works correctly.

Running bash-4.4-beta under xterm, I get

bash-4.4$ trap
trap -- '' SIGTTOU

and Ctrl-Z works correctly.  Running bash-4.4-beta under rxvt, I get:

bash-4.4$ trap
trap -- '' SIGTSTP
trap -- '' SIGTTIN
trap -- '' SIGTTOU

and Ctrl-Z *doesn't* work.

The issue for me personally is that I'd like to run bash 4.4-beta, which corrects
some bugs I've run into, under urxvt, which has better font support than xterm.

Is there a workaround, a way to re-enable correct Ctrl-Z handling?

On Tue, Nov 10, 2015 at 7:33 AM, Chet Ramey <chet.ramey@case.edu> wrote:
On 11/9/15 5:55 PM, Keith Thompson wrote:
> I have some more information on this.  In the latest test,
> the problem occurs when I run bash under rxvt, but not when I run it under
> xterm.
>
> Using strace, I've found a difference in a call to rt_sigaction().  It calls
>
> rt_sigaction(SIGTSTP, {SIG_DFL, ...})
>
> under xterm (which works correctly), but
>
> rt_sigaction(SIGTSTP, {SIG_IGN, ...})
>
> under rxvt (where it doesn't).

This can happen if SIGTSTP is ignored when the shell is invoked.  When
bash restores the original signal dispositions in child processes, it
restores SIG_IGN.

--
``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/



--
Keith Thompson <Keith.S.Thompson@gmail.com>

reply via email to

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