Skip to main content

run_capture

Function run_capture 

Source
pub fn run_capture(binary: &str, args: &[&str]) -> Result<String, String>
Expand description

Runs binary args... under DEFAULT_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.