It is probably better to set O_NONBLOCK only for the duration of