rlimit
A simple wrapper for getrlimit
and setrlimit
.
Examples
Set resource limit
use ;
const DEFAULT_SOFT_LIMIT: Rlim = from_raw;
const DEFAULT_HARD_LIMIT: Rlim = from_raw;
assert!;
let soft = from_usize;
let hard = soft * 2;
assert!;
Get resource limit
use ;
assert!;
assert_eq!;
Increase NOFILE limit
See the example nofile.