Path: csiph.com!xmission!news.glorb.com!usenet.stanford.edu!not-for-mail From: Chet Ramey Newsgroups: gnu.bash.bug Subject: Re: return bultin ignores explicit exit value when used in DEBUG trap Date: Thu, 26 Nov 2015 17:44:01 -0500 Organization: ITS, Case Western Reserve University Lines: 15 Approved: bug-bash@gnu.org Message-ID: References: <48d3f5ed-5d00-4a15-bed8-b3b91beec29e@googlegroups.com> Reply-To: chet.ramey@case.edu NNTP-Posting-Host: lists.gnu.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Trace: usenet.stanford.edu 1448577850 20338 208.118.235.17 (26 Nov 2015 22:44:10 GMT) X-Complaints-To: action@cs.stanford.edu Cc: chet.ramey@case.edu To: Grisha Levit , bug-bash@gnu.org Envelope-to: bug-bash@gnu.org User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 In-Reply-To: <48d3f5ed-5d00-4a15-bed8-b3b91beec29e@googlegroups.com> X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020206.56578B32.0061,ss=1,re=0.000,fgs=0, ip=173.189.77.205, so=2015-08-12 04:07:17, dmn=2011-05-27 18:58:46 X-Mirapoint-Loop-Id: 958118718ad0a8846782e8ecd8f0dc57 X-Junkmail-Whitelist: YES (by domain whitelist at mpv2-2015.case.edu) X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020205.56578B32.013B,ss=1,re=0.000,fgs=0, ip=173.189.77.205, so=2015-08-12 04:07:17, dmn=2011-05-27 18:58:46 X-Mirapoint-Loop-Id: bb84aa3d086f67e8aa66641e4accfcf6 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] [fuzzy] X-Received-From: 129.22.103.227 X-BeenThere: bug-bash@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Bug reports for the GNU Bourne Again SHell List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com gnu.bash.bug:11931 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/