Date: Wed, 11 Feb 1998 10:34:49 +1100 From: Bruce Evans <bde@zeta.org.au> To: bde@zeta.org.au, chet@nike.ins.cwru.edu Cc: chet@po.cwru.edu, cracauer@cons.org, freebsd-current@FreeBSD.ORG Subject: Re: cvs commit: src/bin/sh jobs.c Message-ID: <199802102334.KAA29236@godzilla.zeta.org.au>
next in thread | raw e-mail | index | archive | help
>> 4. For subshells, traps caught by the shell shall be set to the default >> values and traps ignored by the shell shall be ignored by the command. >> >> Notes. "the default values" doesn't seem to be specified. It presumably >> means that the corresponding signals are set to SIG_DFL. The initial >> state of trap handlers doesn't seem to be specified anywhere. > >I disagree. I believe that it means the values of signal handlers >inherited from the shells' parent. That is the `initial state of >trap handlers'. > >If a user starts a shell with some signal ignored, he has every right >to expect that all processes begun from that shell will have that >signal ignored. I agree. I was only guessing about the "traps caught by the shell" case. Signals ignored when the shell starts can't be caught (as traps). This is specified clearly enough. sh gets this slightly wrong by putting traps for ignored signals in the trap table and letting you see this with the `trap' command. It correctly never executes such traps. bash gets this slightly wrong by catching "ignored" SIGINTs in interactive mode and handling them as usual. I thought that the bug was in readline (it's in the versions of bash-1, bash-2 and gnuplot in the FreeBSD-2.2.5 packages), but at least the current libreadline handles ignored SIGINTs correctly. bash uses a private version of readline but the gnuplot port uses libreadline.so. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199802102334.KAA29236>