int chdir(int fd);
This syscalls will set the callee’s process current working directory to the passed FD, which must point to a directory.
The syscall returns 0
on success and -1
on failure, with the
following errno:
EBADFD
: The passed descriptor is not a valid directory.