From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@zsh.org
Subject: Re: exec format error ignored?
Date: Mon, 28 Dec 2015 17:13:34 -0800 [thread overview]
Message-ID: <151228171334.ZM20343@torch.brasslantern.com> (raw)
In-Reply-To: <56819F48.7000209@gmail.com>
On Dec 28, 9:44pm, Jacek Wielemborek wrote:
}
} I found that "echo > ~/bin/some_test && some_test" doesn't show me any
} error, but "strace some_test" says that execve failed. How is that?
The shell traps the failed execve and attempts to run the file as a shell
script instead. This silently succeeds (an empty line is the same as
"true" for shell script purposes). This is standard for shells. [*]
Conversely "strace" does not have this special-case run-script logic and
reports the failed execve as an error.
[*] All currently released versions of zsh will report an exec format
error on an *empty* file, as opposed to a file containing a single
newline. This will be fixed in a forthcoming release.
prev parent reply other threads:[~2015-12-29 1:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-28 20:44 Jacek Wielemborek
2015-12-29 1:13 ` Bart Schaefer [this message]
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=151228171334.ZM20343@torch.brasslantern.com \
--to=schaefer@brasslantern.com \
--cc=zsh-workers@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).