% limb manual
% fd_chdir(3)
% limb 0.1.0
% 2023-07-24
# NAME
fd_chdir - change working directory
# SYNOPSIS
#include <limb/djbunix.h>
```pre hl
int fd_chdir(int <em>fd</em>)
```
# DESCRIPTION
The `fd_chdir`() function is a safe wrapper around [fchdir](3), i.e. it cannot
be interrupted by signals. More precisely, if [fchdir](3) fails with *EINTR* it
is automatically called again until it succeeds or fails with another error.
# RETURN VALUE
On success, the `fd_chdir`() function return 0. Otherwise, it returns -1 and
sets `errno` to indicate the error.
# ERRORS
The `fd_chdir`() function may fail and set `errno` for any of the errors
specified for [fchdir](3) except *EINTR*.