#command #extension #process #group

command-group

Extension to Command to spawn in a process group

9 stable releases

2.0.1 Dec 28, 2022
2.0.0 Dec 3, 2022
1.0.8 Oct 16, 2021
1.0.6 Aug 26, 2021
1.0.4 Jul 25, 2021

#63 in Operating systems

Download history 7531/week @ 2022-10-11 5842/week @ 2022-10-18 5161/week @ 2022-10-25 5029/week @ 2022-11-01 5731/week @ 2022-11-08 5653/week @ 2022-11-15 7661/week @ 2022-11-22 8992/week @ 2022-11-29 9846/week @ 2022-12-06 9819/week @ 2022-12-13 8379/week @ 2022-12-20 9576/week @ 2022-12-27 11288/week @ 2023-01-03 12469/week @ 2023-01-10 10843/week @ 2023-01-17 10473/week @ 2023-01-24

46,522 downloads per month
Used in 42 crates (11 directly)

Apache-2.0 OR MIT

160KB
957 lines

Crate release version Crate license: Apache 2.0 or MIT CI status

Command Group

Extension to Command to spawn in a process group.

  • API documentation.
  • Dual-licensed with Apache 2.0 and MIT.
  • Minimum Supported Rust Version: 1.60.0.
    • Only the last five stable versions are supported.
    • MSRV increases within that range at publish time will not incur major version bumps.

Quick start

[dependencies]
command-group = "2.0.1"
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 = "2.0.1", 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);

Dependencies

~0–5MB
~73K SLoC