[dbus PATCH 08/18] main: error out if signal handler is not registered

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

 



Signed-off-by: Pavel Hrdina <phrdina@xxxxxxxxxx>
---
 src/main.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/main.c b/src/main.c
index e0f9434..c4ad1e3 100644
--- a/src/main.c
+++ b/src/main.c
@@ -219,6 +219,10 @@ main(int argc, char *argv[])
                                      virtDBusHandleSignal,
                                      NULL,
                                      NULL);
+    if (signal_watch < 0) {
+        fprintf(stderr, "Failed to register signal handler.\n");
+        return EXIT_FAILURE;
+    }
 
     while (loop_status >= 0)
         virEventRunDefaultImpl();
-- 
2.14.3

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[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