check read_nonblock why read returns 0