Uriel Ginsburg wrote:

> Suppose I'm programming a multiuser application, and I need to switch
> databases in the middle of running...
> It would seem that calling NSS_Shutdown() and then NSS_Init() again doesn't
> work, since the database handles aren't closed properly (???).
> Is this a known bug?


Actually it works, you end up leaking database structures. There is a 
bug where the handles aren't being closed in shutdown. There is a bug 
against reporting the leak. I believe NSS 3.3.x has the fix. What 
version on NSS are you using?

Note that NSS_Shutdown() is a new feature added in the NSS 3.1/3.2 time 
frame. Before NSS_Shutdown() it was not possible to switch Databases.


> If not, perhaps I'm doing something wrong?
> If it is, is there a known workaround or fix?


One caveat, you must completely quiese your NSS calls before you 
shutdown.. NSS_Init() and NSS_Shutdown() are not thread safe.


> 
> Thanks in advance,
> Uriel Ginsburg
> 
> 
> 


Reply via email to