cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: interruptible curl_easy_perform()

From: Gary Maxwell <gmaxwell_at_casabi.com>
Date: Thu, 15 Feb 2007 14:54:30 -0800

>
> On Thu, 15 Feb 2007, Bryan Henderson wrote:
>
> > It ought to be possible to interrupt curl_easy_perform() with a
signal.
> >
> [snip]
> > It is a relatively recent addition to POSIX; there are probably
systems
> that
> > don't have it. On such a system you can emulate it with sigaction()
and
> > select(), but that leaves a tiny window in which the process might
miss
> a
> > signal and wait anyhow. With older Linux kernels, pselect()
actually
> has
> > that same window exposed. Note that isn't any worse than libcurl's
> present
> > logic, in which it _always_ waits in spite of receiving signals.
>
> Yeah, we want libcurl to remain working on system it runs on today so
we
> do
> need a version for non-pselect() systems as well.
>

Agreed. Some of us are using libcurl on OSes that barely have proper
sockets support; POSIX/Linux signal support or emulation on these
systems is likewise non-existent.

Cheers,
Gary Maxwell
Casabi, Inc.
Received on 2007-02-16