curl-library
Re: Signal handling problem in libcurl
From: Jamie Lokier <jamie_at_shareable.org>
Date: Thu, 18 Sep 2008 23:29:18 +0100
Date: Thu, 18 Sep 2008 23:29:18 +0100
Dan Fandrich wrote:
> The right approach is probably to find some way to interrupt the resolver
> from within the signal handler and have it abort normally with an error
> code (a flag set within the signal handler would tell if the abort was
> due to timeout or not). That would allow the flow of control to remain
> outside the signal handler and avoid this problem. The question is: is
> it possible to force a resolver to abort like this (maybe by sending
> it another signal), and if so, is it portable?
The only way I can think of is to run the resolver in a child process,
with the result communicated by pipe, and kill the child process if
you don't want it any more.
-- Jamie
Received on 2008-09-19