Handle -EAGAIN in non-blocking reads on Unix, and return 0 from sp_read().