Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #11408

Re: trap RETURN not set in calling function is overwritten by callee

From Chet Ramey <chet.ramey@case.edu>
Newsgroups gnu.bash.bug
Subject Re: trap RETURN not set in calling function is overwritten by callee
Date 2015-08-21 08:34 -0400
Message-ID <mailman.76.1440160506.31004.bug-bash@gnu.org> (permalink)
References <20150819064852.CEA29342926@1511.sea.i.extrahop.com>

Show all headers | View raw


On 8/19/15 2:48 AM, jtmoon+bashbug@extrahop.com wrote:

> Fix:
> 	For some reason the RETURN traps are not being stacked.  Instead, the
> 	current RETURN trap is just overwritten.

There is only a single RETURN trap.  Functions do not have local traps.  If
a return trap is set when a function returns, it will be executed.  Nor are
there local functions; all functions are at the global scope.

Function tracing mode (for the debugger) changes this somewhat, but you're
not using it.
-- 
``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/

Back to gnu.bash.bug | Previous | Next | Find similar


Thread

Re: trap RETURN not set in calling function is overwritten by callee Chet Ramey <chet.ramey@case.edu> - 2015-08-21 08:34 -0400

csiph-web