This is the mail archive of the
mailing list for the Cygwin project.
read() on serial port
- From: ROLAND <roland_asmann at yahoo dot com>
- To: cygwin at cygwin dot com
- Date: Tue, 29 Jan 2002 05:11:57 -0800 (PST)
- Subject: read() on serial port
I just can't figure it out...
Here is the code of the part that does not work.
signal(SIGALRM,alarm_handler); /* set signal handler
alarm(TIMOUT); /* set alarm */
charsin=read(f3,anmes,256); /* read message + \n
mesan=SET; /* message is ack/nak message */
alarm(0); /* reset alarm */
signal(SIGALRM,SIG_DFL); /* reset signal handler */
For some strange reason my program just locks on the
read(), and then nothing works anymore (not even the
signal and alarm).
Does anybody have a clue???
The program should try to read an ACK/NACK from the
serial port and if it did not read anything within 10
secs, it should trigger the alarm.
Please help me with this, I don't know what to do
Do You Yahoo!?
Great stuff seeking new owners in Yahoo! Auctions!
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html