From 0a2519a5ab04e775115c90039d30bdc576a79c06 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 7 Sep 2015 00:31:24 +0200 Subject: [PATCH 06/20] 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 9da4cb2be260ed123f2676cb85cb350c527b1492. [commit 10edebf6cd69cfbe0d38dbaf5478264fbb60a51e from https://github.com/systemd-rhel/rhel-8/] Signed-off-by: Li Zhou --- src/libsystemd/sd-event/sd-event.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libsystemd/sd-event/sd-event.c b/src/libsystemd/sd-event/sd-event.c index 7c33dcd..2f5ff23 100644 --- a/src/libsystemd/sd-event/sd-event.c +++ b/src/libsystemd/sd-event/sd-event.c @@ -1726,7 +1726,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--; -- 2.17.1