Skip to main content

Crate proc_guard

Crate proc_guard 

Source
Expand description

Process kill-guard (spike D4). The worker tree is host -> cmd.exe -> java.exe; a plain child.kill() reaps only cmd.exe and orphans the JVM. On Windows a job with JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE kills the entire subtree the moment the host drops the last job handle (including host process death). On Unix, process groups (setsid + SIGKILL to the process-group id) give the same effect. The crate builds everywhere with a no-op stub for exotic platforms.

Modules§

unix_imp 🔒

Structs§

JobObject
Process group kill-guard for Unix. The child is spawned in a new session (via setsid()), so it becomes the leader of a new process group. On drop, the entire group is sent SIGKILL, ensuring no orphaned JVM subprocesses.