Path: csiph.com!xmission!news.glorb.com!usenet.stanford.edu!not-for-mail From: Chet Ramey Newsgroups: gnu.bash.bug Subject: Re: [Help-bash] Source builtin and error handling Date: Wed, 2 Dec 2015 11:26:32 -0500 Lines: 19 Approved: bug-bash@gnu.org Message-ID: References: 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: 8bit X-Trace: usenet.stanford.edu 1449073605 32478 208.118.235.17 (2 Dec 2015 16:26:45 GMT) X-Complaints-To: action@cs.stanford.edu Cc: bug-bash , help-bash@gnu.org, chet.ramey@case.edu To: =?UTF-8?B?TWFyY2luIMWad2lnb8WE?= Envelope-to: bug-bash@gnu.org User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 In-Reply-To: X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020204.565F1BB9.015B, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0, ip=0.0.0.0, so=2015-08-12 04:07:17, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 0f201790010f2dd53ae53ba40ba26163 X-Junkmail-Whitelist: YES (by domain whitelist at mpv1-2015.case.edu) X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020202.565F1BB9.020C,ss=1,re=0.000,fgs=0, ip=0.0.0.0, so=2015-08-12 04:07:17, dmn=2011-05-27 18:58:46 X-Mirapoint-Loop-Id: 898e7ccfea3c609739810bf48108ce62 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] [fuzzy] X-Received-From: 129.22.103.226 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:11940 On 11/30/15 3:58 PM, Marcin Świgoń wrote: > Dear bash experts, > > Today I came across a strange situation when using set -e, source > builtin and error handling. Thanks for the report. You found a bug in the handling of nested builtins that should ignore the errexit option. Bash needs to restore the state better around calls to builtins that need to have that setting in place throughout their execution (like source). This will be fixed in the next release of bash. 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/