I think the problem is actually the errno did not get reset.  Does the
program suppose to reset the errno after receviced the alarm timeout
before doing any recv again?  
 

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Lim Hock-Chai
Sent: Tuesday, January 17, 2006 12:35 PM
To: RPG programming on the AS400 / iSeries
Subject: RE: alarm() not working as expected

Do I need to reset the signal once receive the first signal? 

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Lim Hock-Chai
Sent: Tuesday, January 17, 2006 12:21 PM
To: RPG programming on the AS400 / iSeries
Subject: RE: alarm() not working as expected

1) what do you mean someone calling you with a signal?  

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Scott Klement
Sent: Tuesday, January 17, 2006 12:09 PM
To: RPG programming on the AS400 / iSeries
Subject: Re: alarm() not working as expected

That's strange. I've never seen this happen. Do you have other software
running that might be sending you a SIGALRM signal?  Or another signal?

EINTR means that the API call was interrupted by a signal, but it isn't
necessarily the signal that alarm() generated.

The signal number that's received is passed as a parm to your signal
handler, you could try printing it out to see whether it's SIGALRM or
whether it's something else.

I can think of things you could try to work around the problem, but I
can't think of anything (aside from someone calling you with a signal)
that would cause the problem you're experiencing.

--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing
list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
http://archive.midrange.com/rpg400-l.


--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing
list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
http://archive.midrange.com/rpg400-l.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.