Serialport termios & timeout



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.
.



Relevant Pages

  • Serialport termios & timeout
    ... I'm trying to understand how to use the VTIME field of c_cc meber ... well is how to detect the timeout condition: ... and in errno the error code. ... I see that EINTR code signals a signal ...
    (comp.unix.programmer)
  • Re: Serialport termios & timeout
    ... well is how to detect the timeout condition: ... and in errno the error code. ... I see that EINTR code signals a signal ... that information is buried somewhere in the "man termios" pages. ...
    (comp.unix.programmer)
  • Re: Threads and dynamic bindings
    ... It's not specific to dynamic variables. ... Pressing the down arrow should recompute the current timeout. ... keyboard (these signals are similar to CL conditions). ... I implemented a function which I called DynamicSleep. ...
    (comp.lang.lisp)
  • Re: Will python ever have signalhandlers in threads?
    ... would need to volunteer API redesign to make it feasible. ... > However there sometimes seem to be circumstances when signals ... > use this feature properly. ... > with a timeout then you use Queues that can only have 1 element. ...
    (comp.lang.python)
  • Re: blocking file lock functions (lockf,flock,fcntl) do not return after timer signal
    ... signals during the wait in order to avoid state consistency problems (if ... the administrator gets to clean up the lock). ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)