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 12:17:07 -0800

On Tue, Nov 10, 2015 at 11:35 AM, Chet Ramey <chet.ramey@case.edu> wrote:


It seems like you need to figure out why rxvt starts the shell with
SIGTSTP ignored.  It doesn't seem like anything that the system /bin/sh
or the bash version you're running does, since xterm doesn't exhibit
this behavior.

The difference between bash-4.3 and bash-4.4 is a bug fix: if the shell
is started with SIGTSTP ignored (any signal, really), it's supposed to
pass that setting on to the children it invokes.  bash-4.3 didn't do that
in this case, and bash-4.4 does.


And I think I've found it.  In rxvt 2.6.4, src/command.c:

     /*
     * mimick login's behavior by disabling the job control signals
     * a shell that wants them can turn them back on
     */
#ifdef SIGTSTP
    signal(SIGTSTP, SIG_IGN);
    signal(SIGTTIN, SIG_IGN);
    signal(SIGTTOU, SIG_IGN);
#endif              /* SIGTSTP */

The latest release, rxvt 2.7.10, has the same code in src/init.c.
rxvt-unicode (urxvt) has the same code in src/init.C.

Would you consider this a bug in rxvt? It's obviously intentional, but I
don't understand signal handling well enough to know whether it's reasonable.
The comment implies that it's the shell's responsibility to re-enable the
signals -- which bash did prior to 4.4-beta, but no longer does.

There's certainly a bug *somewhere*, since anyone using bash 4.4-beta or later
under rxvt or urxvt won't be able to use Ctrl-Z.  If it's rxvt that's buggy, I'll
contact the rxvt and urxvt maintainers (and I'll probably recompile my own
version with those lines commented out).

--

reply via email to

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