From: Lennart Poettering Date: Tue, 4 Nov 2014 15:34:20 +0000 (+0100) Subject: sd-event: implicitly set signal event source's descriptions to the signal name X-Git-Tag: v218~568 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f1f00dbb7f3741b30d4a26b1a8b65ec46ff1fde3;p=platform%2Fupstream%2Fsystemd.git sd-event: implicitly set signal event source's descriptions to the signal name --- diff --git a/src/journal-remote/journal-remote.c b/src/journal-remote/journal-remote.c index 03410c7..7239b8c 100644 --- a/src/journal-remote/journal-remote.c +++ b/src/journal-remote/journal-remote.c @@ -803,18 +803,10 @@ static int setup_signals(RemoteServer *s) { if (r < 0) return r; - r = sd_event_source_set_description(s->sigterm_event, "sigterm"); - if (r < 0) - return r; - r = sd_event_add_signal(s->events, &s->sigint_event, SIGINT, NULL, s); if (r < 0) return r; - r = sd_event_source_set_description(s->sigint_event, "sigint"); - if (r < 0) - return r; - return 0; } diff --git a/src/libsystemd/sd-event/sd-event.c b/src/libsystemd/sd-event/sd-event.c index f0356a4..e856d68 100644 --- a/src/libsystemd/sd-event/sd-event.c +++ b/src/libsystemd/sd-event/sd-event.c @@ -1031,6 +1031,9 @@ _public_ int sd_event_add_signal( } } + /* Use the signal name as description for the event source by default */ + (void) sd_event_source_set_description(s, signal_to_string(sig)); + if (ret) *ret = s;