Subsystem shutdown registration mechanism for NSS

RESOLVED DUPLICATE of bug 326482

Status

NSS
Libraries
P2
enhancement
RESOLVED DUPLICATE of bug 326482
16 years ago
11 years ago

People

(Reporter: Julien Pierre, Assigned: Julien Pierre)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Assignee)

Description

16 years ago
It would be very useful to have a mechanism through which application 
or NSS subsystems that depend on the NSS core could register a shutdown callback 
function . This function would be called upon entry of NSS_Shutdown().
There could be several functions registered in a LIFO queue.

An example of internal subsystem that could immediately benefit from this would 
be SSL to automatically cleanup the session cache upon NSS_Shutdown().

Another immediate use for this shutdown callback mechanism would be client and 
server plug-ins that want to access NSS directly and may start background 
threads making NSS calls for their own purpose. This would pose a problem if 
these client and server applications, unaware of the plug-in's use of NSS, 
called NSS_Shutdown(), without calling the plug-in's shutdown function, for 
example in case the browser wants to keep plug-ins loaded when switching 
profiles. A crash would follow in that situation. But the shutdown registration 
would take care of the problem very nicely.
This is an interesting idea.  On some Unix systems, the SSL library starts
a thread to look for locks held by dead processes.  It might be nice if 
NSS_Shutdown stopped that thread and closed the server session cache memory
map as a side effect.  It might be nice if NSS_Shutdown cleared the client 
session cache as a side effect.  We wouldn't want NSS_Shutdown to call SSL
functions by name to do this because then libNSS would depend on libSSL.
But if NSS_Shutdown had a callback mechanism, that could be used for these
purposes.  

I'd guess that the callback mechanism might need a flag to indicate whether
the callback function should be called before, or after, the PKCS#11 tokens
were shutdown.
(Assignee)

Updated

16 years ago
Severity: normal → enhancement
Priority: -- → P2
Target Milestone: --- → 4.0

Comment 2

16 years ago
Changed the QA contact to Bishakha.
QA Contact: sonja.mirtitsch → bishakhabanerjee
QA Contact: bishakhabanerjee → jason.m.reid
Assignee: wtchang → nobody
QA Contact: jason.m.reid → libraries
(Assignee)

Updated

11 years ago
Assignee: nobody → julien.pierre.boogz
(Assignee)

Comment 3

11 years ago
This was fixed by Bob as part of bug 326482. Marking as dupe.

Status: NEW → RESOLVED
Last Resolved: 11 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 326482
You need to log in before you can comment on or make changes to this bug.