summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/journal-remote/journal-remote.c8
-rw-r--r--src/libsystemd/sd-event/sd-event.c3
2 files changed, 3 insertions, 8 deletions
diff --git a/src/journal-remote/journal-remote.c b/src/journal-remote/journal-remote.c
index 03410c7925..7239b8cc6d 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 f0356a48e6..e856d68251 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;