David Plew (kishore++at++aimnet.com)
Mon, 17 Mar 1997 19:13:29 -0800 (PST)
In my performer application, I interface with the RE2 5.3, serial
port to read data coming from an external serial device. The port is
opened with the default blocking mode. I set the termio.c_cc[VMIN] and
termio.c_cc[VTIME] to 15 and 4 respectively. According to the man pages
this means that 'read' will wait to read atleast 15 bytes from the port,
and will time out after 4 units of time in any case and return. What is not
clear is that: in such a setting, does blocking mode override the termio
controls or does the 'read' always return after 4 units of time?
I was not doing anything to the O_NONBLOCK flag so far and sometimes,
'read' would wait and wait for ever at the port probably 'coz there was no
data available for it to read. Shouldn't the termio control override what
ever the setting was, once it has been set? I do set the termio controls after
'open' and before any 'read' begins.
Even when I did set the O_NONBLOCK flag, sometimes I can see the same
thing happening to 'read'. Can someone please explain who overrides whome?
thanks
-anita
kishore++at++aimnet.com
=======================================================================
List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/
Submissions: info-performer++at++sgi.com
Admin. requests: info-performer-request++at++sgi.com
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:54:54 PDT