Use global FD vars and openat()