[network-manager-applet/danw/libnm-bgo736911: 16/17] applet: remove custom signal handling
- From: Dan Williams <dcbw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-applet/danw/libnm-bgo736911: 16/17] applet: remove custom signal handling
- Date: Tue, 24 Feb 2015 19:34:04 +0000 (UTC)
commit 16d90be3e407c4b7e9dff0d61dfa1f877f01185e
Author: Dan Williams <dcbw redhat com>
Date: Wed Feb 18 15:58:22 2015 -0600
applet: remove custom signal handling
We only care about TERM/INT, and those are already handled OK by
the event loop. We don't need custom handling for them.
src/applet.h | 1 -
src/main.c | 25 -------------------------
2 files changed, 0 insertions(+), 26 deletions(-)
---
diff --git a/src/applet.h b/src/applet.h
index 0b11bff..d654fab 100644
--- a/src/applet.h
+++ b/src/applet.h
@@ -82,7 +82,6 @@ typedef struct
{
GObject parent_instance;
- GMainLoop *loop;
DBusGConnection *session_bus;
NMClient *nm_client;
diff --git a/src/main.c b/src/main.c
index 27f2ec5..bfd4914 100644
--- a/src/main.c
+++ b/src/main.c
@@ -41,30 +41,6 @@ gboolean shell_debug = FALSE;
gboolean with_agent = TRUE;
static void
-signal_handler (int signo, siginfo_t *info, void *data)
-{
- if (signo == SIGINT || signo == SIGTERM) {
- g_message ("PID %d (we are %d) sent signal %d, shutting down...",
- info->si_pid, getpid (), signo);
- g_main_loop_quit (loop);
- }
-}
-
-static void
-setup_signals (void)
-{
- struct sigaction action;
- sigset_t mask;
-
- sigemptyset (&mask);
- action.sa_sigaction = signal_handler;
- action.sa_mask = mask;
- action.sa_flags = SA_SIGINFO;
- sigaction (SIGTERM, &action, NULL);
- sigaction (SIGINT, &action, NULL);
-}
-
-static void
usage (const char *progname)
{
char *foo;
@@ -105,7 +81,6 @@ int main (int argc, char *argv[])
if (applet == NULL)
exit (1);
- setup_signals ();
g_main_loop_run (loop);
g_object_unref (G_OBJECT (applet));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]