mirror of https://github.com/BOINC/boinc.git
client: if execv ever fails when attempting to launch switcher, exit as quickly as possible in the forked process.
Returning from the switcher_exec() may leave 2 boinc processes running until one crashes.
This commit is contained in:
parent
7fb13c0eaf
commit
8384336a74
client
|
@ -96,7 +96,7 @@ int switcher_exec(const char *util_filename, const char* cmdline) {
|
||||||
execv(util_path, argv);
|
execv(util_path, argv);
|
||||||
fprintf(stderr, "execv failed in switcher_exec(%s, %s): %s", util_path, cmdline, strerror(errno));
|
fprintf(stderr, "execv failed in switcher_exec(%s, %s): %s", util_path, cmdline, strerror(errno));
|
||||||
|
|
||||||
return ERR_EXEC;
|
_exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
// Parent only needs one-way (read) pipes so close write pipes
|
// Parent only needs one-way (read) pipes so close write pipes
|
||||||
close(fds_out[1]);
|
close(fds_out[1]);
|
||||||
|
|
Loading…
Reference in New Issue