mirror of https://github.com/BOINC/boinc.git
client: return a possible error code to the core client if execv fails for some reason in the switcher tool.
This commit is contained in:
parent
55a17c3b41
commit
f014b0d6da
|
@ -130,9 +130,13 @@ int main(int /*argc*/, char** argv) {
|
|||
#endif
|
||||
}
|
||||
|
||||
execv(argv[1], argv+2);
|
||||
retval = execv(argv[1], argv+2);
|
||||
if (retval == -1) {
|
||||
retval = errno;
|
||||
|
||||
// If we got here execv failed
|
||||
fprintf(stderr, "Process creation (%s) failed: errno=%d\n", argv[1], errno);
|
||||
// If we got here execv failed
|
||||
fprintf(stderr, "Process creation (%s) failed: %s (errno = %d)\n", argv[1], strerror(retval), retval);
|
||||
}
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue