distinguish close and EAGAIN