remove stray break, add FD_CLOEXEC, reset fd var even if close fails