Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: exec format error ignored?
- X-seq: zsh-workers 37447
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: exec format error ignored?
- Date: Mon, 28 Dec 2015 17:13:34 -0800
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version:content-type; bh=TObWT9blWZMY+nYpeTK1vnlY8P+UnvvEZw7V5eXst9g=; b=o2C5OynB83SVCZxCmBnAquyyuC8l0oDahiAw1kZHeSbl85khlYrS0s/G93Y+qNl8UN W8TALZ/cHIpu+/7Xg+cYRJeaLx0leOS6hg7Jpgz5bDXKvmgniS2CAl/buSeIDS5/IJ3R KDbBJ+eWbau6yph3ZyNrFby9nSqSjddZz/5cUA3oessBj+9PPylXNVSey0s4ksTO0hLz k+KFkIDC65gNNwhOFjLri8Ov1ZVFX9bDOBnVRkANhArFDKS0c8Uw+ItEpvaKHItwCDH9 0PiTP4nFIxxBtBxO0kQx2JNqft/T+0OlHm4EDwSkS2Esv9YHKZ+TAWzRknYx77y92k8A YJpw==
- In-reply-to: <56819F48.7000209@gmail.com>
- 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
- References: <56819F48.7000209@gmail.com>
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.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author