#command #extension #process #group

command-group

Extension to Command to spawn in a process group

15 stable releases (4 major)

5.0.1 Nov 18, 2023
4.1.0 Nov 4, 2023
3.0.0 Oct 30, 2023
2.1.1 Oct 30, 2023
1.0.4 Jul 25, 2021

#23 in Operating systems

Download history 46368/week @ 2023-08-11 51415/week @ 2023-08-18 50700/week @ 2023-08-25 47419/week @ 2023-09-01 52183/week @ 2023-09-08 52694/week @ 2023-09-15 52548/week @ 2023-09-22 57537/week @ 2023-09-29 59941/week @ 2023-10-06 56462/week @ 2023-10-13 54168/week @ 2023-10-20 57521/week @ 2023-10-27 61459/week @ 2023-11-03 58405/week @ 2023-11-10 57232/week @ 2023-11-17 50047/week @ 2023-11-24

236,349 downloads per month
Used in 60 crates (16 directly)

Apache-2.0 OR MIT

165KB
1K SLoC

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.68.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 = "5.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 = "5.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);

Also see the Examples!

Dependencies

~0–9.5MB
~77K SLoC