diff options
-rw-r--r-- | src/chroot.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/chroot.c b/src/chroot.c index 760087587..4904c84d6 100644 --- a/src/chroot.c +++ b/src/chroot.c @@ -102,8 +102,10 @@ main (int argc, char **argv) /* Execute the given command. */ execvp (argv[0], argv); - error (1, errno, _("cannot execute %s"), argv[0]); - exit (1); - return 1; + { + int exit_status = (errno == ENOENT ? 127 : 126); + error (0, errno, "%s", argv[0]); + exit (exit_status); + } } |