20 Jun 17:54
Re: multiple "gnutlses" in single binary
From: Nikos Mavrogiannopoulos <nmav <at> gnutls.org>
Subject: Re: multiple "gnutlses" in single binary
Newsgroups: gmane.network.gnutls.general
Date: 2008-06-20 15:54:45 GMT
Subject: Re: multiple "gnutlses" in single binary
Newsgroups: gmane.network.gnutls.general
Date: 2008-06-20 15:54:45 GMT
Arkadiusz Miskiewicz wrote: > Hello, > > Take a look at this example. > > There is one program (let be it php interpreter) that is able to load external > modules (so modules). > Now we have two external modules - curl and postgresql [1]. Assume both curl > and postgresql use external libraries (libcurl and libpq) that internally > also use gnutls. > Both these libraries initialize and deinitialize gnutls on it's own. > Separately they work fine. > Now it php loads them both at the same time then gnutls initialization happens > twice (once called by curl module and second time by postgres module) and the > same happens for deinitialization. In openssl for example double deinit > causes segfault and is now allowed (a real problem with php + modules btw). > How things look in gnutls? I assume init/deinit also can't be called multiple > times safely, right? No there is no problem as long as they are called in a thread safe way. regards, Nikos
RSS Feed