Re: read() blocking and TIOCINQ

2006-09-05 Thread Igor Peshansky
Ugh, top-posting... Reformatted. On Tue, 5 Sep 2006, Ernesto Paiser wrote: Igor Peshansky wrote: > On Tue, 22 Aug 2006, Ernesto Paiser wrote: > > > Hello Corinna, > > FYI, this is a mailing list, and unless you're replying to a specific > message, you're actually talking to many people. > > >

Re: read() blocking and TIOCINQ

2006-09-05 Thread Ernesto Paiser
Hello Igor, Sorry for my incomplete question. I attach to you the following file that could be compiled with gcc in CYGWIN. Accepted commands start by '?' character, and when the device is not connected on the serial line the function read(...) blocks: DEVICE test program -

RE: read() blocking and TIOCINQ

2006-08-22 Thread Nellis, Kenneth
The value of errno might give you a clue. --Ken Nellis -Original Message- From: Ernesto Paiser [mailto:paiser at esrf dot fr] Sent: Tuesday, August 22, 2006 4:11 AM To: cygwin at cygwin dot com Subject: read() blocking and TIOCINQ Hello Corinna, I have problems with read() function

Re: read() blocking and TIOCINQ

2006-08-22 Thread Igor Peshansky
On Tue, 22 Aug 2006, Ernesto Paiser wrote: > Hello Corinna, FYI, this is a mailing list, and unless you're replying to a specific message, you're actually talking to many people. > I have problems with read() function blocking and > waiting for characters on serial line with cygwin: > > Here are

read() blocking and TIOCINQ

2006-08-22 Thread Ernesto Paiser
Hello Corinna, I have problems with read() function blocking and waiting for characters on serial line with cygwin: Here are some code fragments: fd = open(sl, O_RDWR | O_NOCTTY | O_NONBLOCK | O_NDELAY) newpio.c_cflag = brate | CS8 | CLOCA