Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
zsh exec format error with empty files
- X-seq: zsh-workers 37427
- From: Christian Neukirchen <chneukirchen@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: zsh exec format error with empty files
- Date: Wed, 23 Dec 2015 18:01:58 +0100
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
Hi,
It is customary for POSIXy shells that executables which result in
format errors are interpreted as /bin/sh shell scripts.
zsh does this too, but it doesnt work for empty files:
zsh 5.2 (x86_64-unknown-linux-gnu)
zsh-5.2-0-gc86c20a
% ls -l empty colon
-rwxrwxr-x 1 chris users 2 Dec 23 17:53 colon*
-rwxrwxr-x 1 chris users 0 Dec 23 17:49 empty*
% cat colon
:
% ./colon
% ./empty
zsh: exec format error: ./empty
For consistency, this should just run /bin/sh as well and return 0,
like in bash, dash, busybox sh, tcsh, mksh, ksh93, posh, Byron's rc
and every tool using execvp.
Happy holidays,
--
Christian Neukirchen <chneukirchen@xxxxxxxxx> http://chneukirchen.org
Messages sorted by:
Reverse Date,
Date,
Thread,
Author