Async interface for working with processes.
This crate is an async version of
A background thread named "async-process" is lazily created on first use, which waits for
spawned child processes to exit and then calls the
wait() syscall to clean up the "zombie"
processes. This is unlike the
process API in the standard library, where dropping a running
Child leaks its resources.
Spawn a process and collect its output:
use Command; let out = new.arg.arg.output.await?; assert_eq!;
Read the output line-by-line as it gets produced:
use ; use ; let mut child = new .arg .stdout .spawn?; let mut lines = new.lines; while let Some = lines.next.await
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.