www.libssh2.org | Daily snapshots | Mailing list archive | Docs | Examples | github

Archive Index This month's Index

Subject: Re: libssh2 thread safety

Re: libssh2 thread safety

From: Jasmeet Bagga <jasmeet_at_packetdesign.com>
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 -
http://www.libssh2.org/mail/libssh2-devel-archive-2010-08/0088.shtml -
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 http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2012-04-14

the libssh2 team