cURL / Mailing Lists / curl-library / Single Mail


Re: Is it possible to break the timeout of select call?

From: Daniel Stenberg <>
Date: Fri, 2 Oct 2009 15:33:04 +0200 (CEST)

On Fri, 2 Oct 2009, wrote:

> I am using multi handle for my application. I have a select call on the curl
> FDs, and on return of select, i do multi_perform depending upon the return
> value of select . The timeout for select is 1 min. I have a problem here
> since if the select is blocked for 1 mins, and if I want to close my
> application, it hangs for one min.
> I cannot reduce the 1 min timeout. Is it possible to use any curl APIs to
> break this select?

Sure you can reduce the timeout, you can call it again in a loop if it timed

Another option is to let the select() also wait for an additional file
descriptor, for example a pipe that you write to when you want to make
select() trigger.

List admin:
Received on 2009-10-02