Improve error handling when launching test process
* Use `EXIT_FAILURE` instead of an arbitrary exit status * Print the error message
This commit is contained in:
parent
c9dea06cfe
commit
c25a3c9c9a
|
@ -561,12 +561,11 @@ static int execAppInternal(const char *appPath, const char *const *args, std::st
|
|||
// -> execute application
|
||||
if (enableSearchPath) {
|
||||
execvp(appPath, const_cast<char *const *>(args));
|
||||
|
||||
} else {
|
||||
execv(appPath, const_cast<char *const *>(args));
|
||||
}
|
||||
cerr << Phrases::Error << "Unable to execute \"" << appPath << "\": execv() failed" << Phrases::EndFlush;
|
||||
exit(-101);
|
||||
cerr << Phrases::Error << "Unable to execute \"" << appPath << "\": " << std::strerror(errno) << Phrases::EndFlush;
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
#else
|
||||
|
|
Loading…
Reference in New Issue