From 048d8d00fdebb091987968b2f045dc2e9fb64909 Mon Sep 17 00:00:00 2001 From: yanghao Date: Fri, 23 Aug 2024 16:19:26 +0800 Subject: [PATCH] modify process signal Signed-off-by: yanghao Change-Id: Iab9a25cd8a567cd2695265b6ed99953190f34944 --- standard/appspawn_service.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/standard/appspawn_service.c b/standard/appspawn_service.c index 1383a2de..c78da6dd 100644 --- a/standard/appspawn_service.c +++ b/standard/appspawn_service.c @@ -173,12 +173,12 @@ static void HandleDiedPid(pid_t pid, uid_t uid, int status) APPSPAWN_STATIC void ProcessSignal(const struct signalfd_siginfo *siginfo) { - APPSPAWN_LOGI("ProcessSignal signum %{public}d", siginfo->ssi_signo); + APPSPAWN_LOGI("ProcessSignal signum %{public}d %{public}d", siginfo->ssi_signo, siginfo->ssi_pid); switch (siginfo->ssi_signo) { case SIGCHLD: { // delete pid from app map pid_t pid; int status; - while ((pid = waitpid(-1, &status, WNOHANG)) > 0) { + while ((pid = waitpid(siginfo->ssi_pid, &status, WNOHANG)) > 0) { HandleDiedPid(pid, siginfo->ssi_uid, status); } #ifdef CJAPP_SPAWN