diff options
author | Lennart Poettering <lennart@poettering.net> | 2014-05-17 21:13:10 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2014-05-18 13:52:49 +0200 |
commit | f864fd1b4b4546244dfb59bb59196598742fa29c (patch) | |
tree | 66cc60a35a25268190782efd5ff8e4d53207a5e1 /src/timesync | |
parent | timesyncd: enable watchdog support (diff) | |
download | systemd-f864fd1b4b4546244dfb59bb59196598742fa29c.tar.xz systemd-f864fd1b4b4546244dfb59bb59196598742fa29c.zip |
timesyncd: make use of floating event sources for signal handling
Diffstat (limited to 'src/timesync')
-rw-r--r-- | src/timesync/timesyncd.c | 7 | ||||
-rw-r--r-- | src/timesync/timesyncd.h | 3 |
2 files changed, 2 insertions, 8 deletions
diff --git a/src/timesync/timesyncd.c b/src/timesync/timesyncd.c index 21843363d2..19e6d67c63 100644 --- a/src/timesync/timesyncd.c +++ b/src/timesync/timesyncd.c @@ -978,8 +978,8 @@ static int manager_new(Manager **ret) { sd_event_set_watchdog(m->event, true); - sd_event_add_signal(m->event, &m->sigterm, SIGTERM, NULL, NULL); - sd_event_add_signal(m->event, &m->sigint, SIGINT, NULL, NULL); + sd_event_add_signal(m->event, NULL, SIGTERM, NULL, NULL); + sd_event_add_signal(m->event, NULL, SIGINT, NULL, NULL); r = sd_resolve_default(&m->resolve); if (r < 0) @@ -1006,9 +1006,6 @@ static void manager_free(Manager *m) { manager_disconnect(m); manager_flush_names(m); - sd_event_source_unref(m->sigint); - sd_event_source_unref(m->sigterm); - sd_event_source_unref(m->event_retry); sd_event_source_unref(m->network_event_source); diff --git a/src/timesync/timesyncd.h b/src/timesync/timesyncd.h index 370b966fc6..471d4b0a12 100644 --- a/src/timesync/timesyncd.h +++ b/src/timesync/timesyncd.h @@ -92,9 +92,6 @@ struct Manager { /* Retry connections */ sd_event_source *event_retry; - - /* Handle SIGINT/SIGTERM */ - sd_event_source *sigterm, *sigint; }; const struct ConfigPerfItem* timesyncd_gperf_lookup(const char *key, unsigned length); |