(limit: Resource, new: Rlimit)
| 213 | |
| 214 | #[inline] |
| 215 | pub(crate) fn setrlimit(limit: Resource, new: Rlimit) -> io::Result<()> { |
| 216 | unsafe { |
| 217 | let lim = rlimit_to_linux(new); |
| 218 | match ret(syscall_readonly!( |
| 219 | __NR_prlimit64, |
| 220 | c_uint(0), |
| 221 | limit, |
| 222 | by_ref(&lim), |
| 223 | null_mut::<c::c_void>() |
| 224 | )) { |
| 225 | Ok(()) => Ok(()), |
| 226 | Err(err) => Err(err), |
| 227 | } |
| 228 | } |
| 229 | } |
| 230 | |
| 231 | #[inline] |
| 232 | pub(crate) fn prlimit(pid: Option<Pid>, limit: Resource, new: Rlimit) -> io::Result<Rlimit> { |
nothing calls this directly
no test coverage detected