![Travis-CI Status] ![Latest Version] ![Documentation] ![License]
A simple wrapper for getrlimit
and setrlimit
.
rust
const SOFT: rlim = 4 * 1024 * 1024;
const HARD: rlim = 8 * 1024 * 1024;
rust
assert!(Resource::FSIZE.set(SOFT, HARD).is_ok());
or
rust
assert!(setrlimit(Resource::FSIZE, SOFT, HARD).is_ok());
rust
assert_eq!(getrlimit(Resource::CPU).unwrap(), (RLIM_INFINITY, RLIM_INFINITY));
Support more targets.
| Current targets | | ------------------------- | | i686-unknown-linux-gnu | | i686-unknown-linux-musl | | x8664-unknown-linux-gnu | | x8664-unknown-linux-musl | | i686-apple-darwin | | x86_64-apple-darwin |