All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chet Ramey <chet.ramey@case.edu>
To: Martijn Dekker <martijn@inlv.org>, dash@vger.kernel.org
Cc: chet.ramey@case.edu
Subject: Re: [BUG] 'trap' is not quite POSIX compliant
Date: Mon, 15 Feb 2016 13:46:43 -0500	[thread overview]
Message-ID: <56C21D13.1000506@case.edu> (raw)
In-Reply-To: <56BF4F91.7080105@inlv.org>

On 2/13/16 10:45 AM, Martijn Dekker wrote:

> By the way, dash and zsh, as well as bash in non-POSIX mode, also accept
> the counterintuitive and non-POSIX-compliant form "trap EXIT" to unset
> the trap, but other shells don't: bash (POSIX), yash and ksh93 produce
> an error, while mksh/lksh silently ignore that form. What a mess...

The `trap EXIT' is historical Bourne shell behavior, though Posix makes it
an error.

-- 
``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/

      parent reply	other threads:[~2016-02-15 18:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-13 15:45 [BUG] 'trap' is not quite POSIX compliant Martijn Dekker
2016-02-13 16:08 ` Harald van Dijk
2016-02-15 18:46 ` 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=56C21D13.1000506@case.edu \
    --to=chet.ramey@case.edu \
    --cc=dash@vger.kernel.org \
    --cc=martijn@inlv.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.