1.5.18 ( 0.132/4/2 ) - read() - blocks ( serial programming )
pppd
pppd@terra.com.br
Tue Aug 23 17:40:00 GMT 2005
Hello guys,
I´m working to convert a Linux application to work with Windows XP under Cygwin 1.5.18 ( 0.132/4/2 ). Ncurses package and parallel port programming works without changes ( congratulations ).
I have a problem with serial programming.
First, I did two C files: ( attached )
setcmc7.c - Sets serial configuration through Win32 API. ( Linux termios settings/functions doesn't work for me :-( ).
cmc7.c - Read caracters from serial.
After setting serial configuration by setcmc7.c I can read serial port using cmc7.
My doubt is: Why read() function blocks the terminal (keyboard) until read a caracter ? At Linux it's work fine ( same code ).
My application needs to read keyboard at the same time with serial.
I have tried some flags with open ( O_NONBLOCK, O_NDELAY .. ) unfortunately doesn't work too.
Does anybody can help me please?
Best Regards,
Douglas Schilling Landgraf
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: setcmc7.c
URL: <http://cygwin.com/pipermail/cygwin/attachments/20050823/af1d2c38/attachment.c>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: cmc7.c
URL: <http://cygwin.com/pipermail/cygwin/attachments/20050823/af1d2c38/attachment-0001.c>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: cygcheck.out
URL: <http://cygwin.com/pipermail/cygwin/attachments/20050823/af1d2c38/attachment.ksh>
-------------- next part --------------
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
More information about the Cygwin
mailing list