diff --git a/src/daemon/systemd.ts b/src/daemon/systemd.ts index f5fdc4829..3f50cd58a 100644 --- a/src/daemon/systemd.ts +++ b/src/daemon/systemd.ts @@ -154,6 +154,10 @@ function buildSystemdUnit({ `ExecStart=${execStart}`, "Restart=always", "RestartSec=5", + // KillMode=process ensures systemd only waits for the main process to exit. + // Without this, podman's conmon (container monitor) processes block shutdown + // since they run as children of the gateway and stay in the same cgroup. + "KillMode=process", workingDirLine, ...envLines, "",