Skip to main content

Module process

Module process 

Source
Expand description

Bounded subprocess execution.

The watchdog tick holds the D1 lock while driving osascript (escalate) and claude -p (agentinit). If either hangs, the lock ages past its stale threshold and a concurrent tick force-releases it, entering the tick path twice. Every subprocess held under a lock must be bounded.

run_bounded spawns the child, drains its pipes on dedicated threads, polls try_wait on the main thread, and kills + reaps on timeout.

Structs§

BoundedOutput
Result of a time-bounded subprocess run.

Functions§

run_bounded
Run cmd to completion or timeout, whichever comes first.