Skip to main content

Module launch

Module launch 

Source
Expand description

Spawn the headless launcher and shield host stdout (spike D4). Both child pipes are drained on dedicated threads into the host’s STDERR so ~16 KB of Ghidra log spam per run never contaminates host stdout (reserved for MCP JSON-RPC, M1). The child is wrapped in a kill-guard (Windows Job Object or Unix process group) so the whole host->shell->java.exe tree dies with the host. On targets that are neither (e.g. WASM) the guard is a no-op and that guarantee does not hold: only the direct child is killed when WorkerProcess is dropped.

Structs§

WorkerProcess
A spawned worker process: the child, its kill-guard, and the two pipe-drain threads. Drop order (struct fields drop top-to-bottom) closes the guard last, but the kill mechanism (KILL_ON_JOB_CLOSE or SIGKILL to process group) plus the child’s own exit make teardown robust.

Functions§

spawn_drain 🔒