diff options
author | Rob Landley <rob@landley.net> | 2019-03-10 23:05:24 -0500 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2019-03-10 23:05:24 -0500 |
commit | 677cd8cea214ef73bbbed965580575c9abaa048e (patch) | |
tree | 09f113fdd434384c58c15eebd663b1b1be01d805 /lib/xwrap.c | |
parent | 502b10c2ab6bb273bf280ba355fa30869b955d56 (diff) | |
download | toybox-677cd8cea214ef73bbbed965580575c9abaa048e.tar.gz |
Add TOYFLAG_ARGFAIL() to allow argument parsing failures to exit with value.
Diffstat (limited to 'lib/xwrap.c')
-rw-r--r-- | lib/xwrap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/xwrap.c b/lib/xwrap.c index 223356b3..d7b06c5a 100644 --- a/lib/xwrap.c +++ b/lib/xwrap.c @@ -210,8 +210,8 @@ void xexec(char **argv) toy_exec(argv); execvp(argv[0], argv); + toys.exitval = 126+(errno == ENOENT); perror_msg("exec %s", argv[0]); - toys.exitval = 127; if (!toys.stacktop) _exit(toys.exitval); xexit(); } |