diff options
author | Paul Osborne <osbpau@gmail.com> | 2016-10-27 22:53:21 -0400 |
---|---|---|
committer | Paul Osborne <osbpau@gmail.com> | 2016-10-27 22:53:21 -0400 |
commit | fd1f44e26f9fcb5ac6de3082a44e140935d4c530 (patch) | |
tree | c519c56c12f6065854b93a5670c9dc6b826c9a21 | |
parent | 7b5068aed614286fa4f43a7c9e8a6a99119f75f7 (diff) | |
download | nix-fd1f44e26f9fcb5ac6de3082a44e140935d4c530.zip |
unistd: add docs for chdir
Signed-off-by: Paul Osborne <osbpau@gmail.com>
-rw-r--r-- | src/unistd.rs | 5 |
1 files changed, 5 insertions, 0 deletions
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<RawFd> { 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<P: ?Sized + NixPath>(path: &P) -> Result<()> { let res = try!(path.with_nix_path(|cstr| { |