From fd1f44e26f9fcb5ac6de3082a44e140935d4c530 Mon Sep 17 00:00:00 2001 From: Paul Osborne Date: Thu, 27 Oct 2016 22:53:21 -0400 Subject: unistd: add docs for chdir Signed-off-by: Paul Osborne --- src/unistd.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/unistd.rs b/src/unistd.rs index a371d075..678209a4 100644 --- a/src/unistd.rs +++ b/src/unistd.rs @@ -197,6 +197,11 @@ fn dup3_polyfill(oldfd: RawFd, newfd: RawFd, flags: OFlag) -> Result { Ok(fd) } +/// Change the current working directory of the calling process (see +/// [chdir(2)](http://man7.org/linux/man-pages/man2/chdir.2.html)). +/// +/// This function may fail in a number of different scenarios. See the man +/// pages for additional details on possible failure cases. #[inline] pub fn chdir(path: &P) -> Result<()> { let res = try!(path.with_nix_path(|cstr| { -- cgit v1.2.3