Coverage Report

Created: 2025-11-11 06:03

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/rust/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.2/src/process/chroot.rs
Line
Count
Source
1
#[cfg(feature = "fs")]
2
#[cfg_attr(docsrs, doc(cfg(feature = "fs")))]
3
use crate::{backend, io, path};
4
5
/// `chroot(path)`—Change the process root directory.
6
///
7
/// # References
8
///  - [Linux]
9
///
10
/// [Linux]: https://man7.org/linux/man-pages/man2/chroot.2.html
11
#[cfg(feature = "fs")]
12
#[cfg_attr(docsrs, doc(cfg(feature = "fs")))]
13
#[inline]
14
0
pub fn chroot<P: path::Arg>(path: P) -> io::Result<()> {
15
0
    path.into_with_c_str(backend::process::syscalls::chroot)
16
0
}