pub(crate) fn kill_process_group_forcefully(child: &Child)Expand description
SIGKILL an entire process group in one shot — the unix analogue of
Windows’ TerminateJobObject. child must have been spawned with
.process_group(0) (both spawn_host_unix and srv_spawner::spawn_srv
do this) so its pgid equals its own pid; negating the pid targets the
whole group instead of just the one process, reaping any descendants
(e.g. CEF’s forked renderer/GPU subprocesses) the launcher never tracks
individually. Used by the teardown backstop
(SPEC_LAUNCHER_TEARDOWN_BACKSTOP_2026_07_11) as the hard backstop after
kill_process_group_gracefully’s brief grace window — reserved for
whatever a graceful SIGTERM didn’t reap (a wedged-or-dead srv, or shells
its own stop_all() couldn’t finish in time). No-op if the child has
already exited (its pid may have been reaped; a stale pid’s negated kill
returns ESRCH, ignored).