[gnome-online-accounts] Use g_unix_signal_add() instead of custom implementation



commit 63596c5c809237b716056495bf19bc84ec7d76bc
Author: Stef Walter <stefw gnome org>
Date:   Tue Jan 22 13:15:23 2013 +0100

    Use g_unix_signal_add() instead of custom implementation
    
    Use the standard g_unix_signal_add() code instead of a custom
    implementation. This is available in glib 2.30 and later.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=692285

 src/daemon/Makefile.am    |    1 -
 src/daemon/gposixsignal.c |  148 ---------------------------------------------
 src/daemon/gposixsignal.h |   42 -------------
 src/daemon/main.c         |    8 +--
 4 files changed, 2 insertions(+), 197 deletions(-)
---
diff --git a/src/daemon/Makefile.am b/src/daemon/Makefile.am
index dcb4e7e..bd3df44 100644
--- a/src/daemon/Makefile.am
+++ b/src/daemon/Makefile.am
@@ -27,7 +27,6 @@ goa_daemon_SOURCES = 						\
 				main.c				\
 	goadaemontypes.h					\
 	goadaemon.h		goadaemon.c			\
-	gposixsignal.h		gposixsignal.c			\
 	$(NULL)
 
 goa_daemon_CPPFLAGS =						\
diff --git a/src/daemon/main.c b/src/daemon/main.c
index 73068fd..005e155 100644
--- a/src/daemon/main.c
+++ b/src/daemon/main.c
@@ -23,13 +23,13 @@
 #include "config.h"
 
 #include <glib/gi18n.h>
+#include <glib-unix.h>
 
 #include <signal.h>
 #include <gio/gio.h>
 
 #include <goabackend/goabackend.h>
 
-#include "gposixsignal.h"
 #include "goadaemon.h"
 
 
@@ -117,11 +117,7 @@ main (int    argc,
   sigint_id = 0;
   if (!opt_no_sigint)
     {
-      sigint_id = _g_posix_signal_watch_add (SIGINT,
-                                             G_PRIORITY_DEFAULT,
-                                             on_sigint,
-                                             NULL,
-                                             NULL);
+      sigint_id = g_unix_signal_add (SIGINT, on_sigint, NULL);
     }
 
   name_owner_id = g_bus_own_name (G_BUS_TYPE_SESSION,



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