cURL / Mailing Lists / curl-library / Single Mail


Re: HTTP client as new child process

From: Ajay Tanpure <>
Date: Tue, 19 Feb 2013 17:53:05 +0530

Thank for your reply sir.
The changes you have made works fine.
but if i want to read the data written on the pipe by parent process, then
problem exists.
If i declared character pointer before curl_easy_init() function called,
then no request is sent to the server.

But if declare pointer after the init() call the it works.
I have also mentioned in the code you have edit for me. Commented part is
not giving expected output.
Can you tell why should we need to call init() before?

Thank you

On Tue, Feb 19, 2013 at 3:52 PM, Daniel Stenberg <> wrote:

> On Tue, 19 Feb 2013, Ajay Tanpure wrote:
> Please. Don't top-post nor full-quote.
> But in case of child process, as have mentioned below, functions like
>> curl_easy_setopt(), didn't get called.
> Sure they do. libcurl cannot prevent your code from calling the functions.
> If they don't get called then the problem is not caused by libcurl itself!
> I have searched on web also regarding that, global_init() is NOT thread
>> safe.
> You don't have to search the web for that, just read the libcurl docs. And
> no, it isn't thread-safe. But then fork() doesn't start a new _thread_
> either...
> I am using libcurl version 7.9.6
> REALLY? I suspect that's not correct. 7.9.6 is over 10 years old. I think
> you're using 7.19.6, not exactly the same thing. Please pay (more)
> attention to details.
> [incomplete example]
> Your example didn't build as it was incomplete. I did however amuse myself
> by converting it into a working code example and what do you know? It works
> for me... See the attachment.
> --
> /
> -------------------------------------------------------------------
> List admin:
> Etiquette:

List admin:
Received on 2013-02-19