This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

1.3.2 non-blocking serial read is blocking


This seems to be similar to the problem Christopher Faylor and Dan Morris
were discussing in:

http://sources.redhat.com/ml/cygwin-developers/2000-12/msg00064.html

I have upgraded to the latest 1.3.2 DLL, but the problem (if it is the same)
persists.

This is my first submission, so I hope I provide enough information.  I am
enclosing a .C file which should show the problem.  The program is a simple
infinite loop.  The system is configured to be non-blocking, and does
constant polling of the serial port.  However, once the first character is
received, the system blocks on the next read.  The code is not dead, because
if more characters are sent, the system receives them.

I have tried to use ioctl(..., FIONREAD, ...), to check if there are
character to read before trying, but Cygwin does not support this.

Regards, and thanks,
Anthony

Encl.

 <<serial.c>> 

serial.c

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]