Correct return code checks and docs for a blocking read. #4237
Correctly handle non-blocking mode. #4237