Lines Matching defs:setrlimit
37 /// * [FreeBSD](https://www.freebsd.org/cgi/man.cgi?query=setrlimit)
38 /// * [NetBSD](https://man.netbsd.org/setrlimit.2)
234 /// # use nix::sys::resource::{setrlimit, Resource};
238 /// setrlimit(Resource::RLIMIT_NOFILE, soft_limit, hard_limit).unwrap();
243 /// [setrlimit(2)](https://pubs.opengroup.org/onlinepubs/9699919799/functions/getrlimit.html#tag_16_215)
247 /// Note: `setrlimit` provides a safe wrapper to libc's `setrlimit`.
248 pub fn setrlimit(
259 let res = unsafe { libc::setrlimit(resource as __rlimit_resource_t, &new_rlim as *const rlimit) };
261 let res = unsafe { libc::setrlimit(resource as c_int, &new_rlim as *const rlimit) };