zsh-workers
 help / color / mirror / code / Atom feed
From: Eric Cook <llua@gmx.com>
To: zsh-workers@zsh.org
Subject: Re: Empty file execution behavior differs between zsh and sh
Date: Fri, 23 Feb 2018 16:59:06 -0500	[thread overview]
Message-ID: <3296a27c-2ea7-e7d9-a00a-bc1dbe75bf53@gmx.com> (raw)
In-Reply-To: <CAFYD1PrHbgk14SwMkhtyxB9O-6P1mSAw2zVmDNevQuVWjDX+KQ@mail.gmail.com>

On 02/23/2018 01:21 PM, William Shipley wrote:
> 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.
> 

for more context why this was probably reported:
https://twitter.com/rob_pike/status/966896123548872705


  reply	other threads:[~2018-02-23 22:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-23 18:21 William Shipley
2018-02-23 21:59 ` Eric Cook [this message]
2018-02-23 22:12 ` Eric Cook

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=3296a27c-2ea7-e7d9-a00a-bc1dbe75bf53@gmx.com \
    --to=llua@gmx.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).