Skip to main content

install_process_watchers

Function install_process_watchers 

Source
pub fn install_process_watchers()
Expand description

Step 0: Start parent process watcher BEFORE tokio runtime does real work (Linux/macOS only). On Windows, the frontend uses a Job Object with KILL_ON_JOB_CLOSE instead. Uses getppid() to get the parent PID, then kqueue/pidfd to watch it (event-driven, zero CPU). Falls back to PPID polling if kqueue/pidfd setup fails or parent is init/launchd.