Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit c3b750c

Browse files
committed
CommandExt::chroot: Document difference to underlying chroot
1 parent a3cf6f6 commit c3b750c

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

library/std/src/os/unix/process.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -203,9 +203,11 @@ pub trait CommandExt: Sealed {
203203
/// the command.
204204
///
205205
/// This happens before changing to the directory specified with `Command::current_dir`, and
206-
/// that directory will be relative to the new root. If no directory has been specified with
207-
/// `Command::current_dir`, this will set the directory to `/`, to avoid leaving the current
208-
/// directory outside the chroot.
206+
/// that directory will be relative to the new root.
207+
///
208+
/// If no directory has been specified with `Command::current_dir`, this will set the directory
209+
/// to `/`, to avoid leaving the current directory outside the chroot. (This is an intentional
210+
/// difference from the underlying `chroot` system call.)
209211
#[unstable(feature = "process_chroot", issue = "none")]
210212
fn chroot<P: AsRef<Path>>(&mut self, dir: P) -> &mut process::Command;
211213
}

0 commit comments

Comments
 (0)