From the Linux man page for dup2, those descriptors are automatically closed. If I'm not mistaken, then only case where they are not automatically closed is where newfd == oldfd.