aboutsummaryrefslogtreecommitdiff
path: root/lib/xwrap.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/xwrap.c')
-rw-r--r--lib/xwrap.c2
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();
}