env: Fix return value if the command could not be found
This commit is contained in:
parent
fb4ca81fe8
commit
979f3cb844
2
env.c
2
env.c
|
@ -39,7 +39,7 @@ main(int argc, char *argv[])
|
||||||
execvp(*argv, argv);
|
execvp(*argv, argv);
|
||||||
savederrno = errno;
|
savederrno = errno;
|
||||||
weprintf("execvp %s:", *argv);
|
weprintf("execvp %s:", *argv);
|
||||||
_exit(126 + (savederrno == EEXIST));
|
_exit(126 + (savederrno == ENOENT));
|
||||||
}
|
}
|
||||||
|
|
||||||
for (; environ && *environ; environ++)
|
for (; environ && *environ; environ++)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user