some O_NONBLOCK handling