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