]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
sd-event: do not kill a child process from another child
authorYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 8 Apr 2022 23:50:02 +0000 (08:50 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 12 Apr 2022 16:00:08 +0000 (01:00 +0900)
src/libsystemd/sd-event/sd-event.c

index ca90890442ec05918e044cee3fe42b9ee0e06529..f6ffe01af043105ca51af3f751ceacd1d62b9ff5 100644 (file)
@@ -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);