Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Empty file execution behavior differs between zsh and sh
- X-seq: zsh-workers 42393
- From: William Shipley <willrandship@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Empty file execution behavior differs between zsh and sh
- Date: Fri, 23 Feb 2018 11:21:24 -0700
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=QO85ZDKGSlNoSwJTC4+liprdryQFlsc//nnRwlImMP0=; b=k8aQC5E43VrKpwTtkj2UH1oj/8yAOCwShOBWCZ7KwvROxo3PKS2zkP/3l70Vc0rxwF O0VRaA7HyF8XMUPymkOENXOR46aq9agOkJb1g2ysjbiZwjhXl1v3X/1U9wrik+Zt8wM1 j7wslZ7HIehFlebBYWrx5ID86kIWBNDI39l0DVQlMRgRQMI80wDC9JfIz7hiRVrCTYFF 1gd+ZkCvD4Wu+JeDjxQy9Ggpu4IuBocNzrap1FEDOUX0GEpazgTwl2x3wQl4IhQMCzR9 n4ZnOjaQblqXjrfyz4938iyOv5/TRsLTmR+CMIPPvpMUVUQUl26GqCpFSzGkoCbNvO70 xCBw==
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
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.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author