Expand description
Split out of the single-file bootstrap module unchanged (SPEC_LARGE_FILE_MODULE_ANALYSIS_2026_09_30.md ยง4.3).
Functionsยง
- install_
process_ watchers - 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.
- maybe_
run_ crash_ monitor - Step -1: Crash monitor branch โ must be checked before any other initialization. The monitor process runs a blocking minidumper::Server and exits when the main process disconnects. It does not run any backend logic.
- start_
parent_ ๐watcher - Event-driven parent process watcher using pidfd_open (Linux 5.3+). Falls back to PPID polling on older kernels without pidfd support.
- start_
ppid_ ๐watchdog - Start a ppid polling watchdog on Linux/macOS. If the parent process dies, getppid() changes (reparented to init/launchd). This is safer than PR_SET_PDEATHSIG which tracks the parent thread, not process, and can fire spuriously with async runtimes like Tokio.