From: Yu Watanabe Date: Fri, 8 Apr 2022 23:50:02 +0000 (+0900) Subject: sd-event: do not kill a child process from another child X-Git-Tag: v251-rc2~133^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=86587c93b01ffa14ffdfff3cdf5ba0bfb555d839;p=thirdparty%2Fsystemd.git sd-event: do not kill a child process from another child --- diff --git a/src/libsystemd/sd-event/sd-event.c b/src/libsystemd/sd-event/sd-event.c index ca90890442e..f6ffe01af04 100644 --- a/src/libsystemd/sd-event/sd-event.c +++ b/src/libsystemd/sd-event/sd-event.c @@ -854,6 +854,9 @@ static void source_disconnect(sd_event_source *s) { break; case SOURCE_CHILD: + if (event_pid_changed(s->event)) + s->child.process_owned = false; + if (s->child.pid > 0) { if (event_source_is_online(s)) { assert(s->event->n_online_child_sources > 0);