mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-25 09:39:25 +01:00
t-runner: Improved error reporting in exec. program
This commit is contained in:
parent
7db9c05610
commit
c3213fb95d
@ -322,6 +322,9 @@ static pid_t execute_program(char *argv[], bool wait)
|
|||||||
int status;
|
int status;
|
||||||
pid_t pid, child_pid;
|
pid_t pid, child_pid;
|
||||||
|
|
||||||
|
if (!argv[0])
|
||||||
|
return -1;
|
||||||
|
|
||||||
child_pid = fork();
|
child_pid = fork();
|
||||||
if (child_pid < 0) {
|
if (child_pid < 0) {
|
||||||
l_error("Failed to fork new process");
|
l_error("Failed to fork new process");
|
||||||
@ -333,7 +336,8 @@ static pid_t execute_program(char *argv[], bool wait)
|
|||||||
|
|
||||||
execvp(argv[0], argv);
|
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);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user