From a28a5b675d5362dd9380d93630d282bd753160fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Date: Wed, 8 Jan 2025 19:07:53 +0000 Subject: [PATCH] rpc: log details of OS signals received by daemon MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When debugging it is useful to know what signals are being received and metadata related to them. Log this data before calling the signal handling callbacks. Reviewed-by: Jiri Denemark Signed-off-by: Daniel P. Berrangé --- src/rpc/virnetdaemon.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/rpc/virnetdaemon.c b/src/rpc/virnetdaemon.c index e4c6261536..f647cf60ba 100644 --- a/src/rpc/virnetdaemon.c +++ b/src/rpc/virnetdaemon.c @@ -562,6 +562,10 @@ virNetDaemonSignalEvent(int watch, virNetDaemonSignalFunc func = dmn->signals[i]->func; void *funcopaque = dmn->signals[i]->opaque; virObjectUnlock(dmn); + VIR_DEBUG("Dispatch signal num=%d errno=%d code=%d pid=%lld uid=%llu status=%d", + siginfo.si_signo, siginfo.si_errno, siginfo.si_code, + (long long)siginfo.si_pid, (unsigned long long)siginfo.si_uid, + siginfo.si_status); func(dmn, &siginfo, funcopaque); return; }