mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-29 02:00:31 +08:00
Git children shared the daemon's process group, so the Ctrl-C that starts the drain also killed them, and clients received a truncated response. Spawn them in their own process group, and let the response body own the child with `kill_on_drop`, so git is killed when the client disconnects or the daemon exits. Git's own children, e.g., `upload-pack` and `pack-objects`, die at their next write once nobody reads their output. The example unit switches from `KillMode=process` to `mixed`, so systemd also kills leftover git processes once httpd exits. Under the default `control-group`, systemd would signal them directly and cut clones short as soon as the drain starts. Co-authored-by: Daniel Norman <daniel@norman.life>