mirror of
https://github.com/rust-lang/rust.git
synced 2025-11-24 22:57:53 +00:00
Add std::os::unix::fs::chroot to change the root directory of the current process This is a straightforward wrapper that uses the existing helpers for C string handling and errno handling. Having this available is convenient for UNIX utility programs written in Rust, and avoids having to call the unsafe `libc::chroot` directly and handle errors manually, in a program that may otherwise be entirely safe code.