]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
Revert "core/service: when resetting PID also reset known flag"
authormsizanoen <msizanoen@qtmlabs.xyz>
Mon, 12 Jun 2023 03:30:12 +0000 (10:30 +0700)
committerLennart Poettering <lennart@poettering.net>
Mon, 19 Jun 2023 16:18:46 +0000 (18:18 +0200)
This reverts commit ff32060f2ed37b68dc26256b05e2e69013b0ecfe.

This change is incorrect as we don't want to mark the PID as invalid but
only mark it as dead.

The change in question also breaks user level socket activation for
`podman.service` as the termination of the main `podman system service`
process is not properly handled, causing any application accessing the
socket to hang.

This is because the user-level `podman.service` unit also hosts two
non-main processes: `rootlessport` and `rootlessport-child` which causes
the `cgroup_good` check to still succeed.

The original submitter of this commit is recommended to find another
more correct way to fix the cgroupsv1 issue on CentOS 8.

src/core/service.c

index 171e091dff17eaedcf87eeaff205761c1347257f..cecdd3bf50f4ea15b6b7e1b9942acea030fb1923 100644 (file)
@@ -3752,7 +3752,6 @@ static void service_sigchld_event(Unit *u, pid_t pid, int code, int status) {
                         return;
 
                 s->main_pid = 0;
-                s->main_pid_known = false;
                 exec_status_exit(&s->main_exec_status, &s->exec_context, pid, code, status);
 
                 if (s->main_command) {