cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: can't connect to server when linked with pthreads

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 1 Aug 2006 09:44:40 +0200 (CEST)

On Mon, 31 Jul 2006, Marshall Crocker wrote:

> I was a little ahead of myself saying that everything works fine after
> building curl without the packages that were causing the stack smashing.
> My application runs fine but I keep getting the message:
>
> couldn't connect to server
>
> If I compile my application without linking it to pthreads I don't see this
> message and I can confirm data is sent to the server. I'm guessing this
> behavior is caused by the pthreads library which denies curl access to
> functions it needs that aren't thread safe.

Really? In a normal linux system I can't remember any non-thread safe
functions that libcurl uses.

> Is there anyway I can figure out what functions curl is having problems
> accessing if that is the problem?

As Dan said, you can strace() to get the failing system call and then you can
gdb your way around libcurl to figure out the rest...

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2006-08-01