From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14395 invoked by alias); 19 Dec 2016 17:50:51 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 22242 Received: (qmail 14167 invoked from network); 19 Dec 2016 17:50:51 -0000 X-Qmail-Scanner-Diagnostics: from out1-smtp.messagingengine.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(66.111.4.25):SA:0(-0.7/5.0):. Processed in 1.335851 secs); 19 Dec 2016 17:50:51 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: d.s@daniel.shahaf.name X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: none (ns1.primenet.com.au: domain at daniel.shahaf.name does not designate permitted sender hosts) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= daniel.shahaf.name; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s= mesmtp; bh=jgoXamsefObcBHYJHdfHFyXzeXA=; b=ytX0PocGhwN3YBQUjUmKg Hgd/HOESbuqDqPOYc+GyPnSpGa7VYYeGKOKPp5LFzBxgJqvXRjcCITns1oILffgE 6GuS2rGGg7oQX6txvYcbrOEQA3T8XCMj/WDkvdhmF5jEbrde/IHlsubMgJYUwD0R MzWebJphWSASS0mT6fhTFY= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s= smtpout; bh=jgoXamsefObcBHYJHdfHFyXzeXA=; b=uq8bxWS3jzU7Y1jbnhMo tWDHZzNSEV/0suz6ugEgRX5/khd1qNclOSzFLly0kSLbW/XMmOHaRKMdsN6XH5eO p6zqVUsU0a5/7MlpDQJiOvsd0Iwp/5rvON44lEft7j8n6MiBFmW3n7QirtOYyAUE SlwZAJRA7Xkpokv5sOZqKJI= X-ME-Sender: X-Sasl-enc: ygTN/Z3lkkmbLgj/wYug1Av7EPHYs3YHUpvZ6xIqjSNL 1482169840 Date: Mon, 19 Dec 2016 17:47:46 +0000 From: Daniel Shahaf To: Ray Andrews Cc: zsh-users@zsh.org Subject: Re: trapped in bash Message-ID: <20161219174746.GA27982@fujitsu.shahaf.local2> References: <58559FC0.3080501@eastlink.ca> <161217124354.ZM7815@torch.brasslantern.com> <5855BEF2.6090208__18199.534857604$1482015164$gmane$org@eastlink.ca> <20161218150628.GB9158@fujitsu.shahaf.local2> <5856B133.9010602@eastlink.ca> <20161219003219.GA21509@fujitsu.shahaf.local2> <161218183056.ZM5304@torch.brasslantern.com> <9da2ae82-ac3f-6ee3-5452-5a008cf129e7@eastlink.ca> <161218214811.ZM5814@torch.brasslantern.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Ray Andrews wrote on Mon, Dec 19, 2016 at 08:26:43 -0800: > On 18/12/16 09:48 PM, Bart Schaefer wrote: > >The shell finds the file, because it's responsible for path search. > Exactly, I'd expect zsh to handle that with an appropriately helpful > message, but past that point I quite understand that it's not the shell's > affair. Mind, even subsequent error messages might be preceded by > 'execve()' reports: ...' or something like that, it would just make further > diagnosis a bit faster. Yes, error messages should generally be signed. Perhaps something along these lines? — diff --git a/Src/exec.c b/Src/exec.c index 7e29e9c..37d4690 100644 --- a/Src/exec.c +++ b/Src/exec.c @@ -699,7 +699,7 @@ execute(LinkList args, int flags, int defpath) if (arg0 == s || unset(PATHDIRS) || (arg0[0] == '.' && (arg0 + 1 == s || (arg0[1] == '.' && arg0 + 2 == s)))) { - zerr("%e: %s", lerrno, arg0); + zerr("execve: %e: %s", lerrno, arg0); _exit((lerrno == EACCES || lerrno == ENOEXEC) ? 126 : 127); } break; @@ -774,7 +774,7 @@ execute(LinkList args, int flags, int defpath) } if (eno) - zerr("%e: %s", eno, arg0); + zerr("execve: %e: %s", eno, arg0); else if (commandnotfound(arg0, args) == 0) _exit(lastval); else diff --git a/Test/C05debug.ztst b/Test/C05debug.ztst index 9a8df1d..ee2c1b8 100644 --- a/Test/C05debug.ztst +++ b/Test/C05debug.ztst @@ -52,15 +52,9 @@ # Failure exit 10 HERE - $ZTST_testdir/../Src/zsh -f ./zsh-trapreturn-bug2 2>erroutput.dif - mystat=$? - ( - setopt extendedglob - print ${"$(< erroutput.dif)"%%:[^:]#: ./fdasfsdafd} - ) - (( mystat == 0 )) + $ZTST_testdir/../Src/zsh -f ./zsh-trapreturn-bug2 0: trapreturn handling bug is properly fixed ->./zsh-trapreturn-bug2:5 +*?./zsh-trapreturn-bug2:5: execve:*./fdasfsdafd fn() { setopt localtraps localoptions debugbeforecmd diff --git a/Test/E01options.ztst b/Test/E01options.ztst index 45df9f5..d40dc2e 100644 --- a/Test/E01options.ztst +++ b/Test/E01options.ztst @@ -782,7 +782,7 @@ >File in upper dir >File in lower dir >unsetting option... -?(eval):14: no such file or directory: pathtestdir/findme +?(eval):14: execve: no such file or directory: pathtestdir/findme (setopt pathdirs; path+=( /usr/bin ); type ./env) 1:whence honours PATH_DIRS option