env: Fix return value if the command could not be found

This commit is contained in:
sin 2015-10-07 16:23:46 +01:00
parent fb4ca81fe8
commit 979f3cb844

2
env.c
View File

@ -39,7 +39,7 @@ main(int argc, char *argv[])
execvp(*argv, argv);
savederrno = errno;
weprintf("execvp %s:", *argv);
_exit(126 + (savederrno == EEXIST));
_exit(126 + (savederrno == ENOENT));
}
for (; environ && *environ; environ++)