(lim: Rlimit)
| 265 | /// Convert a Rust [`Rlimit`] to a C `rlimit64`. |
| 266 | #[inline] |
| 267 | fn rlimit_to_linux(lim: Rlimit) -> rlimit64 { |
| 268 | let rlim_cur = match lim.current { |
| 269 | Some(r) => r, |
| 270 | None => RLIM64_INFINITY as _, |
| 271 | }; |
| 272 | let rlim_max = match lim.maximum { |
| 273 | Some(r) => r, |
| 274 | None => RLIM64_INFINITY as _, |
| 275 | }; |
| 276 | rlimit64 { rlim_cur, rlim_max } |
| 277 | } |
| 278 | |
| 279 | #[inline] |
| 280 | pub(crate) fn wait(waitopts: WaitOptions) -> io::Result<Option<(Pid, WaitStatus)>> { |