On Tue, Apr 1, 2014 at 3:37 AM, Philip Guenther <guent...@gmail.com> wrote:

> you stated that my description was wrong and not what you were
> looking for on at least one point of behavior.

If by that, you mean this:

>>    If no data is received, it should still return after 0.1s.
> No, read() should not return 10 times per second when there is "no
> data". It must depend on VMIN and VTIME.

I didn't mean you were wrong. The action of "no data" can vary,
depending the combination of VMIN and VTIME. I was clarifying what I
wanted.

> But whatever.  I would probably do it by clearing VMIN and VTIME and
> poll()ing for input with no timeout.  Once that returns that there's
> data available, set VMIN to the desired value and poll() again with
> the desired timeout.  When that returns clear VMIN and do the read().
> That perfectly matches the spec inside my head; if it doesn't match
> the spec inside your head then you should have stated what you were
> trying to do in your last half dozen messages.

I never considered altering VMIN in flight. My application proxies
sockets to serial ports in a select() loop, and I want to keep it
simple. But thanks for the idea, I will ponder it.

> Enough wanking.  Time to get back to solving *real* problems.

It's not hypothetical to me.

Reply via email to