Add missing function call 04/291904/1
authorHwankyu Jhun <h.jhun@samsung.com>
Tue, 25 Apr 2023 02:38:10 +0000 (02:38 +0000)
committerHwankyu Jhun <h.jhun@samsung.com>
Tue, 25 Apr 2023 02:38:10 +0000 (02:38 +0000)
To prevent crash issues, ExecuteEcho() should be called before calling exit()
with the error code.

Change-Id: I1e745cd752bac61381af35d84875bbaf5239c861
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
src/launchpad-process-pool/app_executor.cc

index 91f6b32..fb65f07 100644 (file)
@@ -126,6 +126,7 @@ void AppExecutor::OnExecution() {
   if (ret < 0) {
     _E("Failed to prepare executing application(%s)",
         app_info_->GetAppId().c_str());
+    ExecuteEcho(app_info_->GetAppPath());
     exit(ret);
   }
 
@@ -134,6 +135,7 @@ void AppExecutor::OnExecution() {
   char** app_argv = static_cast<char**>(calloc(argv.size() + 1, sizeof(char*)));
   if (app_argv == nullptr) {
     _E("Out of memory");
+    ExecuteEcho(app_info_->GetAppPath());
     exit(-1);
   }