Function setrlimit
pub unsafe fn setrlimit(resource: i32, rlimit: &rlimit_t) -> Result<(), i32> ⓘ
Available on crate feature
dep_nc
only.Expand description
Set resource limit.
§Examples
let rlimit = nc::rlimit_t {
rlim_cur: 128,
rlim_max: 128,
};
let ret = unsafe { nc::setrlimit(nc::RLIMIT_NOFILE, &rlimit) };
assert!(ret.is_ok());