From: Andrew P. <at...@pi...> - 2006-05-01 17:52:53
|
On Mon, May 01, 2006 at 01:23:52PM -0400, Vlad Seryakov wrote: > Subject: Module unloading Well, don't think you're talking about module unloading at all (good!). You seem to be talking about callbacks to call when shutting down the Naviserver process. > Funny thing i encountered today, working with Berkeley module, i > discovered that once loaded, DB driver is never closed, in case of DB it > needs to be closed otherwise datafile can be corrupted. What do you mean the, "DB driver is never closed"? What is the actual problem, specifically? > I am thinking to make it more generic, to add Ns_ModuleShutdown call to > the modules and if defined, register it and on server shutdown call them > in reverse order. Each module will decide what to do it if such public There is already a Tcl ns_atshutdown command. Is it not sufficient for whatever special case handling you need to do for you use of Berkeley DB on Naviserver process shutdown? > And for nsdb module i would close all pools on exit, for SQL drivers > that is not the problem but for others it could be important. If it's not necessary, why do it? Could it hang or otherwise break or delay orderly process shutdown? If not, then it seems like a reasonable and maybe desirable thing to do. And if it is desirable, why not just do it by default all the time, for all nsdb database pools? -- Andrew Piskorski <at...@pi...> http://www.piskorski.com/ |