SIO_RP_BLOCK, fill the buffer (possibly blocking) if the
buffer is empty. Update the stream position information unless flags
include SIO_RP_NOPOS. This function effectively provides
functionality similar to POSIX read() on a stream. This function
is used by read_pending_codes/3.