From: arumble@extro.ucc.su.OZ.AU (Anthony Rumble) Subject: Re: Termios question: Semantics of VMIN/VTIME on Linux/SunOS ? Date: Tue, 21 Jul 1992 14:35:20 GMT
torvalds@klaava.Helsinki.FI (Linus Benedict Torvalds) writes:
>The way linux does this is (a) wait for at least one character (VMIN > 0
>and VTIME > 0), (b) read as many characters as possible, with a timeout
>of max 0.10 seconds between any of the first 5 characters. Thus the
>read can return:
Errm.. Question.. Can you think of a possible USE of this?
It dosen't seem quite logical to do it this way, it would be
much more usefull to return on either 5 chars OR timeout regardless
on the first character..
>>I was under the impression that this should actually return on
>>either 5 characters recieved, or sizeof(buffer), or timeout..
>The only thing that I have that explains this all is the SunOS manpage,
>so I cannot actually guarantee the above behaviour by linux is correct.
>Could somebody with the POSIX standard available actually check it out?
Well.. Reading my "POSIX programmers guide, I get the impression
that the correct behaviour is as I stated above, either 5 chars, or sizeof(buffer) or timeout..
-- Anthony Rumble aka SmilieZ "Anything is possible.. If there is enuf money in it"