Extension to Command
to spawn in a process group.
- API documentation.
- Dual-licensed with Apache 2.0 and MIT.
- Minimum Supported Rust Version: 1.51.0.
[dependencies]
command-group = "1.0.8"
use std::process::Command;
use command_group::CommandGroup;
let mut child = Command::new("watch").arg("ls").group_spawn()?;
let status = child.wait()?;
dbg!(status);
[dependencies]
command-group = { version = "1.0.8", features = ["with-tokio"] }
tokio = { version = "1.10.0", features = ["full"] }
use tokio::process::Command;
use command_group::AsyncCommandGroup;
let mut child = Command::new("watch").arg("ls").group_spawn()?;
let status = child.wait().await?;
dbg!(status);