diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2016-10-25 17:00:13 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2016-10-25 17:00:13 +0200 |
commit | b7adf7ac32e65906932935daf3d7a02d94818e09 (patch) | |
tree | 5da2c3015695c5368b92326dff987f9f51723a1a /shell/ash_doc.txt | |
parent | f11c6989ba40f6bed8c4b4f0b6b7578aba3a63f9 (diff) | |
download | busybox-b7adf7ac32e65906932935daf3d7a02d94818e09.tar.gz |
ash,hush: set exit code 127 in "sh /does/not/exist" case
Upstream commit 1 for ash:
[ERROR] Allow the originator of EXERROR to set the exit status
Some errors have exit status values specified by POSIX and it is
therefore desirable to be able to set the exit status at the EXERROR
source rather than in main.c.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Upstream commit 2 for ash:
[INPUT] Use exit status 127 when the script to run does not exist
This commit makes dash exit with return code 127 instead of 2 if
started as non-interactive shell with a non-existent command_file
specified as argument (or a directory), as documented in
http://www.opengroup.org/onlinepubs/009695399/utilities/sh.html#tag_04_128_14
The wrong exit code was reported by Clint Adams and Jari Aalto through
http://bugs.debian.org/548743
http://bugs.debian.org/548687
Signed-off-by: Gerrit Pape <pape@smarden.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
NB: in fact, http://bugs.debian.org/548687 was not fixed by this:
"sh /dir/" thinks that EISDIR error on read is EOF, and exits 0.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell/ash_doc.txt')
0 files changed, 0 insertions, 0 deletions