Don't forget to zero out closed file descriptors to prevent double-close()