Don't try to close a just closed file descriptor.