curl-library
Re: SIGALRM and sigaction
Date: Tue, 11 Jun 2002 15:43:19 +0200 (MET DST)
On Mon, 10 Jun 2002, J. Cone wrote:
> It may be that the resolving library detects EINTR and retries.
>
> If so, probably the only way out is with siglongjump, which may not be
> entirely platform independent.
>
> Take these comments with a grain of salt, because I haven't read any of the
> relevant code.
Thanks.
I believe you're right. The name resolve function of course uses a set of
funtion calls and thus traps the SIGALRM etc itself...
Anyone has any idea of how widely available sigsetjmp() and siglongjmp() are?
Jacky Lam wrote:
> I don't know whether it helps. Before we have a case that
> gethhostbyname is blocking so long(usually more than 2 minutes...) when
> the it doesn't get any response from DNS server. We can't find any way
> to stop gethostbyname from waiting until we find there is s variable
> (struct _res_state _res) defined in resolv.h. It allows us to set the
> internal retry time and timeout limit inside gethostbyname.
Yes, that might work for you, but is a highly specific solution to that
particular implementation of gethostbyname. I want it portable and working
with getaddrinfo() too... :-/
-- Daniel Stenberg -- curl groks URLs -- http://curl.haxx.se/ _______________________________________________________________ Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas - http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlinkReceived on 2002-06-11