Remove exit() call 22/294622/1
authorHwankyu Jhun <h.jhun@samsung.com>
Thu, 22 Jun 2023 00:50:55 +0000 (00:50 +0000)
committerHwankyu Jhun <h.jhun@samsung.com>
Thu, 22 Jun 2023 00:50:55 +0000 (00:50 +0000)
Even if execv() call is failed, the launchpad-loader must not call the exit().
It can cause the deadlock issue if the library does not consider caling
exit handlers immediately.

Change-Id: Ieae9da9c9a5162a4dc5da3d78460a8e02c7cdf5d
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
src/launchpad-loader/launchpad_loader.cc

index 24981c0..eb660be 100644 (file)
@@ -275,10 +275,9 @@ int LaunchpadLoader::DoExec(int argc, char** argv, const std::string& lib_dir) {
     char err_buf[1024];
     fprintf(stderr, "Failed to execute a file. path: %s, errno: %d(%s)\n",
         argv[0], errno, strerror_r(errno, err_buf, sizeof(err_buf)));
-    exit(EXIT_FAILURE);
   }
 
-  return 0;
+  return -1;
 }
 
 int LaunchpadLoader::OnTerminate(int argc, char** argv) {