* exec format error ignored?
@ 2015-12-28 20:44 Jacek Wielemborek
2015-12-29 1:13 ` Bart Schaefer
0 siblings, 1 reply; 2+ messages in thread
From: Jacek Wielemborek @ 2015-12-28 20:44 UTC (permalink / raw)
To: zsh-workers
[-- Attachment #1: Type: text/plain, Size: 169 bytes --]
Hi,
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?
Cheers,
d33tah
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: exec format error ignored?
2015-12-28 20:44 exec format error ignored? Jacek Wielemborek
@ 2015-12-29 1:13 ` Bart Schaefer
0 siblings, 0 replies; 2+ messages in thread
From: Bart Schaefer @ 2015-12-29 1:13 UTC (permalink / raw)
To: zsh-workers
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-12-29 1:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-28 20:44 exec format error ignored? Jacek Wielemborek
2015-12-29 1:13 ` Bart Schaefer
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).