delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/06/27/08:04:16

X-Spam-Check-By: sourceware.org
Message-ID: <4682529E.6060107@byu.net>
Date: Wed, 27 Jun 2007 06:05:50 -0600
From: Eric Blake <ebb9 AT byu DOT net>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.12) Gecko/20070509 Thunderbird/1.5.0.12 Mnenhy/0.7.5.666
MIME-Version: 1.0
To: Richard A Nelson <cowboy AT linux DOT vnet DOT ibm DOT com>
CC: cygwin AT cygwin DOT com
Subject: Re: Bash is broken wrt trap :(
References: <4681CDCD DOT 7030709 AT linux DOT vnet DOT ibm DOT com> <4681DFBD DOT 7040906 AT byu DOT net> <46820824 DOT 6000602 AT linux DOT vnet DOT ibm DOT com>
In-Reply-To: <46820824.6000602@linux.vnet.ibm.com>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Richard A Nelson on 6/27/2007 12:48 AM:
> OS=AIX
> bash=3.00.16(1)-release
>
> OS=Linux      << RH EL WS 4 (Nahant)
> bash=3.00.15(1)-release

Just as I suspected.  You are comparing apples to oranges.  Until you run
bash 3.2 on all machines, you can't be sure that it was an intentional
upstream change between bash 3.0 and 3.2, rather than a cygwin-specific
compilation botch.

> However, the return trap is defined to execute in the context of the
> caller, after the called function has completed...   and since all it
> does is execute
> 'false', it does cause the parents ERR trap to trigger, and things go
> pretty smoothly (on some machines).

All that man bash says is "If a sigspec is RETURN, the command arg is
executed each time a shell function or a script executed with the . or
source builtins finishes executing".  It doesn't say whether the trap is
run in the context of the function or of the caller.  This is not
cygwin-specific - you will need to take your report upstream to the bash
maintainer.

- --
Don't work too hard, make some time for fun as well!

Eric Blake             ebb9 AT byu DOT net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGglKd84KuGfSFAYARAm4/AJ44reipi6QeuQLXzzPaDVeEnqUWwgCcCtlo
DAnPuAhQe46y9zUNQO4vMMQ=
=ppDh
-----END PGP SIGNATURE-----

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019