rpc: log details of OS signals received by daemon

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 <jdenemar@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
Daniel P. Berrangé 2025-01-08 19:07:53 +00:00
parent a586411889
commit a28a5b675d

View File

@ -562,6 +562,10 @@ virNetDaemonSignalEvent(int watch,
virNetDaemonSignalFunc func = dmn->signals[i]->func; virNetDaemonSignalFunc func = dmn->signals[i]->func;
void *funcopaque = dmn->signals[i]->opaque; void *funcopaque = dmn->signals[i]->opaque;
virObjectUnlock(dmn); 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); func(dmn, &siginfo, funcopaque);
return; return;
} }