Add printing log message for debugging 41/295641/1
authorHwankyu Jhun <h.jhun@samsung.com>
Wed, 12 Jul 2023 04:58:00 +0000 (13:58 +0900)
committerHwankyu Jhun <h.jhun@samsung.com>
Wed, 12 Jul 2023 04:58:00 +0000 (13:58 +0900)
To debug the performance issue, this patch adds log print to the
Util::CloseAllFds().

Change-Id: Id6a1eb2439eb57c5a7123cf5cb448a704be154b0
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
src/lib/launchpad-glib/util.cc

index 12745e1..700eeca 100644 (file)
@@ -481,12 +481,13 @@ void Util::CloseAllFds() {
 
       fds.push_back(fd);
     }
-
-    for (auto fd : fds)
-      close(fd);
   } catch (const fs::filesystem_error& e) {
     _E("Execption occurs. error(%s)", e.what());
   }
+
+  _W("size: %zd", fds.size());
+  for (auto fd : fds)
+    close(fd);
 }
 
 int Util::PrepareAppSocket() {