[Zope] how do I manage a graceful shutdown?

Tim Lynch lynch@gould.mannlib.cornell.edu
Mon, 24 Feb 2003 13:33:56 EST


I wrote my original question a week or so ago then promptly disappeared
to take care of some family business.  So, thanks to all of you for
carrying on this discussion which I'm just now catching up on.

yes, what I want is for my product to be notified of an impending shutdown 
so it can do whatever it needs to "close up shop" so to speak.

Given the problems with each approach that's been suggested, I'll probably
skip this idea for now, though it seems to me that it'd be a good thing
to have a standard way for a product to register a request for notification
of shutdown.  This might result in product authors having to be extra careful
in how they _write_ their products ... but still, I think it'd be useful.

anyway, thanks guys for suggestions.

---
Tim Lynch
tlynch@nal.usda.gov


> Toby Dickenson wrote:
> >
> > Aha! you want to be *notified* of shutdown, rather than participate in a
> > gradual, *staged* shutdown.
> 
> yep
> 
> > What problems could there be in atexit semantics?
> 
> Just the stuff Dieter mentioned about the ZODB being closed by that
> time, afaik--could be something of an inconvenience.
> 
> --
> Jamie Heilman                   http://audible.transient.net/~jamie/
> "You came all this way, without saying squat, and now you're trying
>  to tell me a '56 Chevy can beat a '47 Buick in a dead quarter mile?
>  I liked you better when you weren't saying squat kid."	-Buddy