cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: curl_global_init function in child process

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Mon, 18 Feb 2013 20:38:00 +0100

On Mon, Feb 18, 2013 at 08:55:44PM +0530, Ajay Tanpure wrote:
> I am using curl library in my application to make http post request and receive
> the responses from the server.

Then the curl-library mailing list is a better place to discuss this.

> But when i have created child using fork() system call, something went wrong
> and other function like curl_setpot(), init() didn't work.
>
> Can anyone tell me how to make curl function work in child process.

Does the program call any curl functions before the fork()? Can you delay all
curl calls until afterward? fork() leaves open any file descriptors in the
child process, which could cause weird behaviour in some circumstances since
the underlying resource will be shared.

>>> Dan
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2013-02-18