mirror of
https://github.com/systemd/systemd.git
synced 2025-03-08 08:58:27 +03:00
sd-event: implicitly set signal event source's descriptions to the signal name
This commit is contained in:
parent
356779df90
commit
f1f00dbb7f
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user