From 8384336a74a2dc00545cb42ffd2a067595303b49 Mon Sep 17 00:00:00 2001 From: Rom Walton Date: Mon, 28 Jul 2014 13:28:51 -0400 Subject: [PATCH] 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. --- client/sandbox.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/sandbox.cpp b/client/sandbox.cpp index 3165308d1c..f8301d708e 100644 --- a/client/sandbox.cpp +++ b/client/sandbox.cpp @@ -96,7 +96,7 @@ int switcher_exec(const char *util_filename, const char* cmdline) { execv(util_path, argv); 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 close(fds_out[1]);