#kill #process #terminate #timeout #wait

process_control

Methods for ergonomically running processes with timeouts

16 releases (8 stable)

3.1.0 Jul 14, 2021
3.0.1 Jan 24, 2021
2.0.2 Oct 3, 2020
1.1.0 May 18, 2020
0.7.0 Mar 17, 2020

#34 in Concurrency

Download history 1821/week @ 2021-04-03 1654/week @ 2021-04-10 2423/week @ 2021-04-17 2318/week @ 2021-04-24 2082/week @ 2021-05-01 3439/week @ 2021-05-08 1778/week @ 2021-05-15 1682/week @ 2021-05-22 2021/week @ 2021-05-29 1445/week @ 2021-06-05 1420/week @ 2021-06-12 1291/week @ 2021-06-19 2370/week @ 2021-06-26 1945/week @ 2021-07-03 3415/week @ 2021-07-10 2068/week @ 2021-07-17

8,711 downloads per month
Used in 4 crates

MIT/Apache

30KB
547 lines

Process Control

This crate allows running a process with a timeout, with the option to terminate it automatically afterward. The latter is surprisingly difficult to achieve on Unix, since process identifiers can be arbitrarily reassigned when no longer used. Thus, it would be extremely easy to inadvertently terminate an unexpected process. This crate protects against that possibility.

Methods for creating timeouts are available on ChildExt, which is implemented for Child. They each return a builder of options to configure how the timeout should be applied.

GitHub Build Status

Usage

Add the following lines to your "Cargo.toml" file:

[dependencies]
process_control = "3.1"

See the documentation for available functionality and examples.

Rust version support

The minimum supported Rust toolchain version is currently Rust 1.36.0.

License

Licensing terms are specified in COPYRIGHT.

Unless you explicitly state otherwise, any contribution submitted for inclusion in this crate, as defined in LICENSE-APACHE, shall be licensed according to COPYRIGHT, without any additional terms or conditions.

Dependencies

~90KB