]> git.ipfire.org Git - thirdparty/systemd.git/commit
core: fix race condition during startup of a service with ExitType=cgroup
authorFuminobu TAKEYAMA <ftake@geeko.jp>
Mon, 10 Jul 2023 15:30:27 +0000 (00:30 +0900)
committerMike Yuan <me@yhndnzj.com>
Fri, 14 Jul 2023 02:51:41 +0000 (10:51 +0800)
commitef4300654e70e76ed74f7d544e0f44c5d92fb698
treec6e951569ab4bbc780cd2b9dfc004fb6a3492e13
parenta035a33f83434036f7a9b42a12ee00912d8cadc5
core: fix race condition during startup of a service with ExitType=cgroup

This commit allows service_sigchld_event() is executed before
service_dispatch_exec_io(), which might happen when a main process exits
very quickly.

Also do not check PID for service goodness because the main process have
already been exited in this case.

Fix: #27919
src/core/service.c