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


Groups > gnu.bash.bug > #11931

Re: return bultin ignores explicit exit value when used in DEBUG trap

From Chet Ramey <chet.ramey@case.edu>
Newsgroups gnu.bash.bug
Subject Re: return bultin ignores explicit exit value when used in DEBUG trap
Date 2015-11-26 17:44 -0500
Organization ITS, Case Western Reserve University
Message-ID <mailman.780.1448577850.31583.bug-bash@gnu.org> (permalink)
References <48d3f5ed-5d00-4a15-bed8-b3b91beec29e@googlegroups.com>

Show all headers | View raw


On 11/19/15 2:06 AM, Grisha Levit wrote:
> Not sure if this is a documentation bug or a functional one, but the man page does not seem to agree with the observed behavior for return when invoked in DEBUG traps.

Thanks for the report.  The internal trap handler used for DEBUG and other
signals the shell treats specially needed to pick up the argument supplied
to `return' as well as noting `return' was called.

This affects the DEBUG, RETURN, and ERROR traps.

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/

Back to gnu.bash.bug | Previous | NextPrevious in thread | Find similar


Thread

return bultin ignores explicit exit value when used in DEBUG trap Grisha Levit <grishalevit@gmail.com> - 2015-11-18 23:06 -0800
  Re: return bultin ignores explicit exit value when used in DEBUG trap Chet Ramey <chet.ramey@case.edu> - 2015-11-26 17:44 -0500

csiph-web