[PATCH] rpc: log details of OS signals received by daemon

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

Signed-off-by: Daniel P. Berrangé <berrange@xxxxxxxxxx>
---
 src/rpc/virnetdaemon.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/rpc/virnetdaemon.c b/src/rpc/virnetdaemon.c
index e4c6261536..94c23e973f 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=%llu uid=%llu status=%d",
+                      siginfo.si_signo, siginfo.si_errno, siginfo.si_code,
+                      (unsigned long long)siginfo.si_pid, (unsigned long long)siginfo.si_uid,
+                      siginfo.si_status);
             func(dmn, &siginfo, funcopaque);
             return;
         }
-- 
2.47.1




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux