The `dir_fd` argument to `execveat()` is not for setting the current working directory. It is used to resolve relative executable paths, hence explicit `chdir/fchdir` call is required to set CWD.
@(require_results)
Errno
Error
O_RDONLY
os.open
flush
0, nil
io