SysProc
SysProc class.
Wrapper of psutil.Process class.
This class that only exposes necessary functionalities to easily manage shell processes.
Initialize self. See help(type(self)) for accurate signature.
psutil.Process | Nonebool - FalseReturn all the chlidren of process recursively.
listProcessboolboolKill the process and all its children.
If the process was started with a process group (start_new_session=True), sends SIGTERM to the entire process group first for graceful shutdown, waits briefly, then sends SIGKILL to any survivors. Otherwise, falls back to killing each child individually.
Get process statistics
dictWait for a process PID to terminate
AnyAnySysProcAnySysProcFind any process with a LISTEN socket on port and kill its entire process group.
Killing the process group (SIGKILL via killpg) takes down the listener plus its supervisor and siblings atomically — necessary for runners like Reflex where the listener's parent would otherwise respawn a replacement between our kill and the next bind attempt.
Returns the list of PIDs that were targeted (may be empty). If the OS denies access to enumerate sockets, logs a warning and returns [].
intlist