Fix a bug about invoking the event listener 16/295516/1
authorHwankyu Jhun <h.jhun@samsung.com>
Mon, 10 Jul 2023 06:49:27 +0000 (15:49 +0900)
committerHwankyu Jhun <h.jhun@samsung.com>
Mon, 10 Jul 2023 06:51:15 +0000 (15:51 +0900)
Although the event listener of the signal manager is registered,
the signal manager did not call the event listener.
This patch fixes the problem.

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

index 81ea1b0..de8b624 100644 (file)
@@ -194,6 +194,9 @@ int SignalManager::GetSigchldFd() {
 }
 
 void SignalManager::HandleSigchld(pid_t pid, int status) {
+  if (listener_ != nullptr)
+    listener_->OnSigchldReceived(pid);
+
   DBus::SendAppDeadSignal(pid, status);
   recycle_bin_->Add(std::make_shared<GarbageCollector>(pid));
 }