cURL / Mailing Lists / curl-users / Single Mail


Re: could a call to curl_simple_request() block forever?

From: Dan Fandrich <>
Date: Thu, 30 Mar 2006 09:56:51 -0800

On Thu, Mar 30, 2006 at 04:09:09PM +0100, Dan Searle wrote:
> I have implemented a program which uses CURL to make HTTPS (SSL) POST
> requests. The program is a non interactive daemon process, so it needs
> to be 100%, my question is...
> Can a call to curl_simple_request() potentially block forever, i.e.
> perhaps when a write() or read() call blocks and there's a problem
> with the underlying socket.

Presumably you mean curl_easy_perform().

> If so I could implement an alarm call to force the forked process
> which is handling the request to die (by calling _exit() from within
> the SIGALARM signal handler. I don't want to have to do this if it's
> not required, i.e. curl_simple_request() has a timeout feature already
> implemented.

Did you do 'man curl_easy_setopt' and search for 'timeout'?

>>> Dan

--              The web change of address service
          Let webmasters know that your web site has moved
Received on 2006-03-30