From: Daniel Shahaf <d.s@daniel.shahaf.name>
To: Ray Andrews <rayandrews@eastlink.ca>
Cc: zsh-users@zsh.org
Subject: Re: trapped in bash
Date: Mon, 19 Dec 2016 17:47:46 +0000 [thread overview]
Message-ID: <20161219174746.GA27982@fujitsu.shahaf.local2> (raw)
In-Reply-To: <ab7aeb33-d091-6602-8baa-cce92300d289__26556.3400615521$1482166729$gmane$org@eastlink.ca>
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
next prev parent reply other threads:[~2016-12-19 17:50 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-16 15:33 Ray Andrews
2016-12-16 21:51 ` Aaron Schrab
2016-12-16 22:39 ` Ray Andrews
2016-12-16 23:05 ` Bart Schaefer
2016-12-17 20:27 ` Ray Andrews
2016-12-17 20:43 ` Bart Schaefer
2016-12-17 22:40 ` Ray Andrews
[not found] ` <5855BEF2.6090208__18199.534857604$1482015164$gmane$org@eastlink.ca>
2016-12-18 15:06 ` Daniel Shahaf
2016-12-18 15:54 ` Ray Andrews
2016-12-19 0:32 ` Daniel Shahaf
2016-12-19 2:30 ` Bart Schaefer
2016-12-19 4:29 ` Ray Andrews
2016-12-19 5:48 ` Bart Schaefer
2016-12-19 16:26 ` Ray Andrews
[not found] ` <ab7aeb33-d091-6602-8baa-cce92300d289__26556.3400615521$1482166729$gmane$org@eastlink.ca>
2016-12-19 17:47 ` Daniel Shahaf [this message]
2016-12-17 23:16 ` Jim
2016-12-17 23:38 ` Ray Andrews
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161219174746.GA27982@fujitsu.shahaf.local2 \
--to=d.s@daniel.shahaf.name \
--cc=rayandrews@eastlink.ca \
--cc=zsh-users@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).