3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-10-04 02:18:49 +02:00

t-runner: Improved error reporting in exec. program

This commit is contained in:
Tim Kourt 2016-05-13 14:34:53 -07:00 committed by Denis Kenzior
parent 7db9c05610
commit c3213fb95d

View File

@ -322,6 +322,9 @@ static pid_t execute_program(char *argv[], bool wait)
int status;
pid_t pid, child_pid;
if (!argv[0])
return -1;
child_pid = fork();
if (child_pid < 0) {
l_error("Failed to fork new process");
@ -333,7 +336,8 @@ static pid_t execute_program(char *argv[], bool wait)
execvp(argv[0], argv);
l_error("Failed to call execvp: %s", strerror(errno));
l_error("Failed to call execvp for: %s. Error: %s", argv[0],
strerror(errno));
exit(EXIT_FAILURE);
}