Skip to main content

Module platform

Module platform 

Source

Structs§

ProcessGroupHandle
No-op handle on Unix — process group cleanup uses killpg with the child PID.

Functions§

configure_process_group
Configure the command to run in a new process group. Unix: process_group(0), Windows: CREATE_NEW_PROCESS_GROUP
home_dir
Get the current user’s home directory.
identify_port_owner
Identify which process owns a given TCP port.
is_process_alive
Check if a process with the given PID is still alive.
post_spawn_setup
Perform any post-spawn setup (e.g., Job Object on Windows). Returns a handle that must be kept alive for the process lifetime.
shell_command
Create a platform-appropriate shell command. Unix: sh -c <command>, Windows: cmd.exe /C <command>
shell_name
Shell name for log messages.
terminate_child
Gracefully terminate a child process and its descendants. Tries graceful shutdown first, then forcefully kills after 5 seconds.