Move CloseAllFds() call after printing logs. 52/318452/2
authorChanggyu Choi <changyu.choi@samsung.com>
Fri, 17 Jan 2025 04:39:18 +0000 (13:39 +0900)
committerChanggyu Choi <changyu.choi@samsung.com>
Fri, 17 Jan 2025 08:06:50 +0000 (08:06 +0000)
CloseAllFds() can close dlog fd.

  F/LIBDLOG  (P 4762, T 2650): libdlog's internal state has been destroyed! The user application closed libdlog's file descriptor.

Change-Id: Ia5eec4b1ad1c91a050ad3fe9193f088628ed4810
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
src/launchpad-process-pool/app_executor.cc

index 657584a9533cf3a93556f74f67582310e9826a28..bf999a6d2b4d74000b5507e225552fbd47fc401a 100644 (file)
@@ -184,8 +184,8 @@ void AppExecutor::OnExecution() {
   if (!lib_dir.empty())
     setenv("LD_LIBRARY_PATH", lib_dir.c_str(), 1);
 
-  Util::CloseAllFds();
   SECURE_LOGE("Execute application(%s)", app_argv[LoaderArg::Path]);
+  Util::CloseAllFds();
   if (execv(app_argv[LoaderArg::Path], app_argv) < 0) {
     char err_buf[1024];
     fprintf(stderr, "Failed to execute a file. path: %s, errno: %d(%s)\n",