zsh-workers
 help / color / mirror / code / Atom feed
* Empty file execution behavior differs between zsh and sh
@ 2018-02-23 18:21 William Shipley
  2018-02-23 21:59 ` Eric Cook
  2018-02-23 22:12 ` Eric Cook
  0 siblings, 2 replies; 3+ messages in thread
From: William Shipley @ 2018-02-23 18:21 UTC (permalink / raw)
  To: zsh-workers

[-- Attachment #1: Type: text/plain, Size: 404 bytes --]

In sh and bash

touch true
chmod +x true
./true
echo $?

prints 0, as an empty file returns successfully on execution.

On zsh, the same command returns

zsh: exec format error: ./true

on stderr and

126

for the echo statement.

This holds true when running zsh in sh compatibility mode:

ARGV0=sh zsh

I don't consider this of pressing importance, but it would be one step
closer to sh compatibility.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-02-23 22:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-23 18:21 Empty file execution behavior differs between zsh and sh William Shipley
2018-02-23 21:59 ` Eric Cook
2018-02-23 22:12 ` Eric Cook

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).