mirror of
https://codeberg.org/guix/guix.git
synced 2026-01-25 03:55:08 -06:00
daemon: ‘runProgram’ exits with 127 upon ENOENT or similar.
This is in accordance with widespread conventions. Previously it would exit with code 1, which was misleading. * nix/libutil/util.cc (runProgram): Exit with 127 if ‘execv’ or ‘execvp’ fails. Change-Id: I5df214afffda69aa329a25afbc48f6cbfdd0961c
This commit is contained in:
parent
512920e7a3
commit
c7b8f3ec1a
1 changed files with 3 additions and 1 deletions
|
|
@ -1193,7 +1193,9 @@ string runProgram(Path program, bool searchPath, const Strings & args)
|
|||
else
|
||||
execv(program.c_str(), stringsToCharPtrs(args_).data());
|
||||
|
||||
throw SysError(format("executing `%1%'") % program);
|
||||
int err = errno;
|
||||
printMsg(lvlError, format("executing `%1%': %2%") % program % strerror(err));
|
||||
_exit(127);
|
||||
});
|
||||
|
||||
pipe.writeSide.close();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue