Expand description
OS-level process utilities for robust server shutdown and stale process cleanup.
This module provides functions for checking process liveness, performing escalating kills (including process-group kills to handle wrapper scripts), and cleaning up stale pidfiles from crashed test runs.
All utilities are intentionally synchronous so they can be used from
Drop implementations as well as from async startup paths.
Functionsยง
- force_
kill - Escalating kill: SIGTERM, wait grace period, then SIGKILL process group and individual PID.
- kill_
by_ port - Kill any process listening on a TCP port via
lsof. - pid_
alive - Check if a process is alive via
kill -0. - read_
pidfile - Read a PID from a pidfile.