Documentation
¶
Overview ¶
Package sys provides cross-platform process management utilities.
This package handles low-level OS-specific operations for process group management, signal handling, and process lifecycle control. It abstracts the differences between Unix (PGID-based) and Windows (taskkill-based) process termination strategies.
The primary purpose is to ensure proper cleanup of CLI processes and their children, preventing zombie processes and resource leaks.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsProcessAlive ¶
IsProcessAlive checks if the process is still running using Signal(0) (Unix).
func KillProcessGroup ¶
KillProcessGroup terminates the entire process tree using the negative PID (Unix).
func SetupCmdSysProcAttr ¶
SetupCmdSysProcAttr configures the command to run in its own process group (Unix).
Types ¶
This section is empty.