sd-event: make sure to create a signal queue for the right signal

We should never access the "signal" part of the event source unless the
event source is actually for a signal. In this case it's a child pid
handler however, hence make sure to use the right signal.

This is a fix for PR #1177, which in turn was a fix for
9da4cb2be2.
This commit is contained in:
Lennart Poettering 2015-09-07 00:31:24 +02:00
parent 2009bcfd23
commit 10edebf6cd

View file

@ -1708,7 +1708,7 @@ _public_ int sd_event_source_set_enabled(sd_event_source *s, int m) {
s->enabled = m;
r = event_make_signal_data(s->event, s->signal.sig, NULL);
r = event_make_signal_data(s->event, SIGCHLD, NULL);
if (r < 0) {
s->enabled = SD_EVENT_OFF;
s->event->n_enabled_child_sources--;