Subject: Re: libssh2 thread safety

Re: libssh2 thread safety

From: Jasmeet Bagga <>
Date: Fri, 13 Apr 2012 18:47:44 -0700

Asked another way, is it safe to use libssh2 from a multi-threaded
application. From this mail thread - -
it appears that as long as a libssh2_init is not called concurrently we
should be fine. In our application, ssh sessions are initiated only from
a single thread, is this ok ?. Do I need to recompile libssh2 with
-D_REENTRANT so that access to errno is sane ?


On 4/13/12 6:00 PM, Jasmeet Bagga wrote:
> Hi,
> Is libssh2 thread safe. Compiling on Linux I don't see D_REENTRANT or
> -pthreads being passed to gcc ?
> Please advise.
> Thanks,
> Jasmeet
> _______________________________________________
> libssh2-devel

Received on 2012-04-14