Non-block flags and EAGAIN error handling