Skip to content

Commit

Permalink
Revert "core/service: when resetting PID also reset known flag"
Browse files Browse the repository at this point in the history
This reverts commit ff32060.

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.

(cherry picked from commit f29f087)
  • Loading branch information
msizanoen1 authored and bluca committed Jul 8, 2023
1 parent 6272d05 commit 34e834f
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/core/service.c
Original file line number Diff line number Diff line change
Expand Up @@ -3529,7 +3529,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) {
Expand Down

0 comments on commit 34e834f

Please sign in to comment.