On Mon, Mar 31, 2014 at 6:13 PM, trifle menot <trifleme...@gmail.com> wrote:
> On Tue, Apr 1, 2014 at 12:23 AM, Philip Guenther <guent...@gmail.com> wrote:
>> I *sounds* like the problem you're trying to solve** is some thing like
>>      I want to efficiently read data from a serial line, returning
>> whenever at least
>>      250 bytes are available or when more then 0.1s has passed.
>>      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.

<sigh>

If you're trying to solve a real problem for an application, then the
question is "how do I solve it given the tools that UNIX provides?"

That's not what you're asking and seem to be uninterested in asking.
Your question is "why haven't OS developers done what I think is
right?"
The answer to that question is "because the POSIX standard says we
shouldn't, and is quite clear about this."

(Those of us who have used the terminal interfaces that predate POSIX
are *very* happy that POSIX came in and pushed them out.)


>> something you're really trying to do?  Your posts make it sound like
>> this is a hypothetical and not something you're actually facing.
>
> Is it always safe to ignore hypothetical problems?

Always?  No.  When it looks like the hypothetical application problem
can be solved using the full UNIX API, I'll stop worrying about it and
worry about real problems.

Is it always safe to ignore standards?  It is always safe to ignore history?


Philip Guenther

Reply via email to