Merge "dup fds before closing them"