Expand description
The Command helpers domains share: which, run and bounded capture with one error
vocabulary. Native only: the page’s build links this crate through the UI’s speech engine,
and a browser page has no subprocesses to look up or start.
The Command helpers Tilo’s domains share: bounded subprocess execution, so every shell-out
shares one error vocabulary (missing binary, non-zero exit, spawn failure) and hands it
straight to tracing::warn!.
Constants§
- DEFAULT_
TIMEOUT - Applies to every shell-out that names no deadline of its own: a tool that exceeds it is killed and reported as a timeout.
- MAX_
CAPTURE_ BYTES - Eight MiB is far above legitimate status or list output, and bounds what a compromised daemon or a network-derived response can make the caller hold.
Functions§
- run
- run_
capture - Runs
binary args...underDEFAULT_TIMEOUT, capturing stdout. A wedged or restarting daemon otherwise leaves its client blocked with no bound, and on the compositor’s thread that stops the desktop painting; a deadline turns it into a stale reading, which callers already handle. stdout and stderr are drained on their own threads, because polling while the child writes into an unread pipe deadlocks once the pipe buffer fills. - run_
capture_ within - which
- Walks
$PATHin-process rather than shelling out towhich(1), which the image does not carry.