Path: csiph.com!optima2.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!usenet.stanford.edu!not-for-mail From: Chet Ramey Newsgroups: gnu.bash.bug Subject: Re: Bug in bash 4.4-beta: suspending and restarting "man" program Date: Tue, 10 Nov 2015 14:35:36 -0500 Lines: 46 Approved: bug-bash@gnu.org Message-ID: References: <56334C9E.1090802@case.edu> <87611nwmi0.fsf@igel.home> <56420E51.1060601@case.edu> Reply-To: chet.ramey@case.edu NNTP-Posting-Host: lists.gnu.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Trace: usenet.stanford.edu 1447184149 3484 208.118.235.17 (10 Nov 2015 19:35:49 GMT) X-Complaints-To: action@cs.stanford.edu Cc: Keith Thompson , Andreas Schwab , bug-bash@gnu.org, chet.ramey@case.edu To: Keith Thompson Envelope-to: bug-bash@gnu.org User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 In-Reply-To: X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020204.56424708.015F, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0, ip=0.0.0.0, so=2015-08-12 04:07:17, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 1f14eff1e529c2260475eee10ef1658b X-Junkmail-Whitelist: YES (by domain whitelist at mpv4-2015.case.edu) X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020201.56424708.01D8,ss=1,re=0.000,fgs=0, ip=0.0.0.0, so=2015-08-12 04:07:17, dmn=2011-05-27 18:58:46 X-Mirapoint-Loop-Id: 788193085ddfefea42b3bc3f28925344 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 129.22.103.195 X-BeenThere: bug-bash@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Bug reports for the GNU Bourne Again SHell List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com gnu.bash.bug:11862 On 11/10/15 2:15 PM, Keith Thompson wrote: > 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. 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. 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/