On 4/4/14, John D. Verne <john.ve...@gmail.com> wrote:

> The meaning of VMIN, VTIME change depending on if they are non-zero or not.
> VTIME is not always an inter-character timer

I know.


> but they way you are using it, it is.

Yes, POSIX case A: MIN>0 and TIME>0.

Case B, MIN>0 and TIME=0, is useless if MIN > 1. A call to read() or
select() may block forever, even though data is in the buffer. Raw
mode default (MIN = 1) is the only reason I would use case B. But
then, read() returns for every byte, and it's CPU hammer time.

Both case C, and case D, may return a count of 0. Since you can't tell
the difference between that 0, vs. end-of-file 0, both are useless to
me.

Case A is the only one that avoids hammering the CPU. But at 11 cps, a
20 second delay may be unacceptable.

After considereing the possibilities, I see a need to extend the
semantics of VTIME. I need a bit flag to make it an overall timer, and
another flag to make the granularity hundredths of a second, instead
of tenths.

Reply via email to