Registry / utility / wait-timeout

wait-timeout

JSON →
library0.2.1rscratesunverified

Waits on a child process with a configurable timeout on Unix and Windows.

# Cargo.toml [dependencies] wait-timeout = "0.2.1"
INSTALL
IMPORT
SIG · WAIT-TIMEOUT
W
wait-timeout
utilityrustv0.2.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ChildExt
✓ use wait_timeout::ChildExt;

Wait for a child process with a 5-second timeout.

use wait_timeout::ChildExt; use std::process::Command; use std::time::Duration; let mut child = Command::new("sleep").arg("10").spawn().unwrap(); let status = child.wait_timeout(Duration::from_secs(5)).unwrap(); match status { Some(status) => println!("Exited with: {}", status), None => println!("Timed out"), }
Debug
Known issues
gotchaOn Unix, uses `SIGKILL` if timeout expires; ensure child cleanup.
fix
Handle the `None` case to kill or abandon the child appropriately.
affects: *
Upgrade
Version history
0.2.1latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
15 hits · last 30 days
node
14
Bingbot
1
Resources
wait-timeout — cargo add wait-timeout · libregistry