Serialport termios & timeout
- From: simnav@xxxxxxxxx
- Date: Sat, 17 Nov 2007 03:49:12 -0800 (PST)
I'm trying to understand how to use the VTIME field of c_cc meber
structure in termios. I need to write an application that reads one
ore more bytes at time with an interchar timeout; I think that
setting the serial terminal as non canonical and the opportune values
for VTIME and VMIN I can do it, right ? What I don't understand very
well is how to detect the timeout condition: reading manpages I found
that read can return the number of read bytes or -1 in case of error
and in errno the error code. I see that EINTR code signals a signal
interruption: timeout timer elapse will generate a signal so will I
get this error code ? What's happen if any other signal are received
by my process during read execution ? EINTR again ? If so how it's
possible to distinguish the two cases ?
Thanks in advance to everyone can help me.
Best regards,
Simone Navari.
.
- Follow-Ups:
- Re: Serialport termios & timeout
- From: Floyd L. Davidson
- Re: Serialport termios & timeout
- Prev by Date: Where were you on November 22, 1963?
- Next by Date: Re: Serialport termios & timeout
- Previous by thread: Where were you on November 22, 1963?
- Next by thread: Re: Serialport termios & timeout
- Index(es):
Relevant Pages
|
|