diff options
| author | Josh Triplett <josh@joshtriplett.org> | 2025-05-20 17:59:18 +0200 |
|---|---|---|
| committer | Josh Triplett <josh@joshtriplett.org> | 2025-05-20 18:25:06 +0200 |
| commit | c3b750ce0f6d1b40874f88b552d271abea3a3dde (patch) | |
| tree | 77d2ff0cc5e94063160e4773bbf9bf750dd164a6 | |
| parent | a3cf6f640828647e34afe96a626b3b4f6bbb22b1 (diff) | |
| download | rust-c3b750ce0f6d1b40874f88b552d271abea3a3dde.tar.gz rust-c3b750ce0f6d1b40874f88b552d271abea3a3dde.zip | |
`CommandExt::chroot`: Document difference to underlying `chroot`
| -rw-r--r-- | library/std/src/os/unix/process.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/library/std/src/os/unix/process.rs b/library/std/src/os/unix/process.rs index 27866badfbe..8d238aa5835 100644 --- a/library/std/src/os/unix/process.rs +++ b/library/std/src/os/unix/process.rs @@ -203,9 +203,11 @@ pub trait CommandExt: Sealed { /// the command. /// /// This happens before changing to the directory specified with `Command::current_dir`, and - /// that directory will be relative to the new root. If no directory has been specified with - /// `Command::current_dir`, this will set the directory to `/`, to avoid leaving the current - /// directory outside the chroot. + /// that directory will be relative to the new root. + /// + /// If no directory has been specified with `Command::current_dir`, this will set the directory + /// to `/`, to avoid leaving the current directory outside the chroot. (This is an intentional + /// difference from the underlying `chroot` system call.) #[unstable(feature = "process_chroot", issue = "none")] fn chroot<P: AsRef<Path>>(&mut self, dir: P) -> &mut process::Command; } |
