From owner-freebsd-current Tue Feb 10 15:36:49 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id PAA11121 for current-outgoing; Tue, 10 Feb 1998 15:36:49 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id PAA11116 for ; Tue, 10 Feb 1998 15:36:47 -0800 (PST) (envelope-from bde@godzilla.zeta.org.au) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.7/8.8.7) id KAA29236; Wed, 11 Feb 1998 10:34:49 +1100 Date: Wed, 11 Feb 1998 10:34:49 +1100 From: Bruce Evans Message-Id: <199802102334.KAA29236@godzilla.zeta.org.au> To: bde@zeta.org.au, chet@nike.ins.cwru.edu Subject: Re: cvs commit: src/bin/sh jobs.c Cc: chet@po.cwru.edu, cracauer@cons.org, freebsd-current@FreeBSD.ORG Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG >> 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