mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-22 07:03:38 +00:00
If running the external command fails in "argv mode" (ie. when not using the shell), then exit with either 126 or 127 as defined by POSIX. This is mostly the same as what bash does, see execute_cmd.c:shell_execve in the bash sources. Note: saving errno around perror(3) if necessary, otherwise you will see different behaviour between verbose and non-verbose mode. In non-verbose mode, perror(3) tried to print to a closed file descriptor, failing and overwriting errno. That took some time to debug.
25 KiB
25 KiB