The event listener should be called when getting the sigchld signal.
Change-Id: I9dc085b04237c1df3df84f73b1345032c4fe9cc3
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
while ((child_pid = waitpid(-1, &status, WNOHANG)) > 0) {
if (child_pid == child_pgid)
killpg(child_pgid, SIGKILL);
-
- if (listener_ != nullptr)
- listener_->OnSigchld(child_pid, status);
}
+
+ if (listener_ != nullptr)
+ listener_->OnSigchld(child_pid, status);
} while (ret == 0);
}
while ((child_pid = waitpid(-1, &status, WNOHANG)) > 0) {
if (child_pid == child_pgid)
killpg(child_pgid, SIGKILL);
-
- if (listener_ != nullptr)
- listener_->OnSigchldReceived(child_pid, status);
}
+
+ if (listener_ != nullptr)
+ listener_->OnSigchldReceived(child_pid, status);
} while (ret == 0);
}