tree: f841cf7f454cc4f3c62950b2a34264e691d877a7
  1. src/
  2. tests/
  3. .cargo-checksum.json
  4. CARETAKERS.md
  5. Cargo.toml
  6. CHANGELOG.md
  7. CITATION.cff
  8. COPYRIGHT
  9. LICENSE-APACHE
  10. LICENSE-MIT
  11. logo.png
  12. logo.svg
  13. README.md
vendor/command-group/README.md

Crate release version Crate license: Apache 2.0 or MIT MSRV: 1.51.0 (breaking) CI status Uses Caretaker Maintainership

Command Group

Extension to Command to spawn in a process group.

Quick start

[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);

Async: Tokio

[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);