Crates.io | process_control |
lib.rs | process_control |
version | 5.0.0 |
source | src |
created_at | 2020-03-04 17:59:44.568077 |
updated_at | 2024-09-15 02:32:40.464231 |
description | Ergonomically run processes with limits |
homepage | |
repository | https://github.com/dylni/process_control |
max_upload_size | |
id | 215439 |
size | 90,423 |
This crate allows running a process with resource limits, such as a running time, and 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 setting limits are available on ChildExt
, which is implemented
for Child
. They each return a builder of options to configure how the limit
should be applied.
Warning: This crate should not be used for security. There are many ways that a process can bypass resource limits. The limits are only intended for simple restriction of harmless processes.
Add the following lines to your "Cargo.toml" file:
[dependencies]
process_control = "5.0"
See the documentation for available functionality and examples.
The minimum supported Rust toolchain version is currently Rust 1.75.0.
Minor version updates may increase this version requirement. However, the previous two Rust releases will always be supported. If the minimum Rust version must not be increased, use a tilde requirement to prevent updating this crate's minor version:
[dependencies]
process_control = "~5.0"
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.
This crate includes copies and modifications of content developed by third parties:
See those files for more details.
Copies of third-party licenses can be found in LICENSE-THIRD-PARTY.