Descriptors provisioned by dup2 already have close-on-exec cleared, so we don't do need to do it in any case where we're operating on such a descriptor.
We also don't need to let O_CLOEXEC stay in fae_oflag if we're just going to clear it later, since it indeed makes little sense to open any file O_CLOEXEC here.
Finally, we can circumvent the dup2() in dup2 fileactions if oldfd == newfd and just clear close-on-exec, since that wouldn't have happened if we just called dup2(old, new).