DASH Shell discussions
 help / color / mirror / Atom feed
From: Chet Ramey <chet.ramey@case.edu>
To: eblake@redhat.com
Cc: dash@vger.kernel.org, chet@po.cwru.edu
Subject: Re: bug in handling of ignored traps
Date: Wed, 8 Feb 2012 15:12:01 -0500	[thread overview]
Message-ID: <120208201201.AA20769.SM@caleb.ins.cwru.edu> (raw)
In-Reply-To: Message from eblake@redhat.com of Wed, 08 Feb 2012 10:27:29 -0700 (id <4F32B081.6090007@redhat.com>)

> Per POSIX requirements on trap, dash is properly refusing to let
> non-interactive scripts reset signal handlers via trap if the shell was
> started with an inherited ignored signal handler.  However, dash lies to
> the user, making it impossible to tell if the user is invoking a shell
> in an environment where a signal was inherited as ignored.  ksh and bash
> are nicer about things, and at least let the user query whether a shell
> is treating a particular signal as non-resettable.

I don't think this is a bug.  It's more of a quality-of-implementation
issue.  dash appears to be following the "no error need be reported
when attempting to do so" part of the Posix spec, which is fine.  Bash
did more or less the same thing until bash-4.2.

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/

      reply	other threads:[~2012-02-08 20:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-08 17:27 bug in handling of ignored traps Eric Blake
2012-02-08 20:12 ` Chet Ramey [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=120208201201.AA20769.SM@caleb.ins.cwru.edu \
    --to=chet.ramey@case.edu \
    --cc=chet@po.cwru.edu \
    --cc=dash@vger.kernel.org \
    --cc=eblake@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox