cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: curl_global_init function in child process

From: Ajay Tanpure <ajaytanpure92_at_gmail.com>
Date: Tue, 19 Feb 2013 09:21:58 +0530

I am using ubuntu 12.04 LTS
And I have called all the library function of curl after i have created the
new process i.e. after fork() in child block (pid == 0)

When i run it independently it works but not with the fork call.

On Tue, Feb 19, 2013 at 1:08 AM, Dan Fandrich <dan_at_coneharvesters.com>wrote:

> 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
>

-------------------------------------------------------------------
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-19