cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: CURLOPT_WRITEFUNCTION blocking?

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Tue, 23 Nov 2010 23:58:55 -0800

On Mon, Nov 22, 2010 at 06:16:23PM -0600, Randy Schuster wrote:
> I'm forking a child that is using CURLOPT_WRITEFUNCTION.
>
> How do you block or wait until all of the data is written?
>
> I suspect the children processes are exiting before all the of data
> is received.

If you're using the easy interface, then curl_easy_perform() will only
exit once the transfer is complete. Once that returns, then it's safe
for the child to exit. Of course, you cannot try to access the same
easy (or multi, for that matter) handle from both parent and child.

>>> Dan
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-11-24