delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/01/29/10:16:40

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <20020129151455.38444.qmail@web9106.mail.yahoo.com>
Date: Tue, 29 Jan 2002 07:14:55 -0800 (PST)
From: ROLAND <roland_asmann AT yahoo DOT com>
Subject: Re: AW: read() on serial port
To: "Martin, Andreas {GW~Mannheim}" <ANDREAS DOT MARTIN AT Roche DOT COM>
Cc: cygwin AT cygwin DOT com
In-Reply-To: <851F2BFC7E78D211A69800A0C9DB012802D80A17@rm2msem1.mah.roche.com>
MIME-Version: 1.0

Mmmm....
I don't know why you think that would work...
Anyways, it doesn't solve the problem, I still can't
get the program to work...
You have any other ideas??

Roland

--- "Martin, Andreas {GW~Mannheim}"
<ANDREAS DOT MARTIN AT Roche DOT COM> wrote:
> Hi,
> 
> simply try to remove the backslash from your remark.
> 
> 
>    charsin=read(f3,anmes,256); /* read message + cr
> */
> 
> 
> 
> -----Ursprüngliche Nachricht-----
> Von: ROLAND [mailto:roland_asmann AT yahoo DOT com]
> Gesendet am: Dienstag, 29. Januar 2002 14:12
> An: cygwin AT cygwin DOT com
> Betreff: 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 */
> while(mesan!=SET){
>     if(progopt==SET)	printf("<");
>     charsin=read(f3,anmes,256); /* read message + \n
> */
> 	if(anmes[2]=='0'&&anmes[3]=='1')
> 	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
> anymore.
> 
> Roland
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Great stuff seeking new owners in Yahoo! Auctions! 
> http://auctions.yahoo.com
> 
> --
> 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/


__________________________________________________
Do You Yahoo!?
Great stuff seeking new owners in Yahoo! Auctions! 
http://auctions.yahoo.com

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019