[Zope3-dev] How to shutdown Zope3 gracefully?

Benji York benji at zope.com
Tue Jul 19 17:55:30 EDT 2005


Tim Peters wrote:
> Adam is running on Windows.

Sorry, my email has been up and down today, I didn't read the message 
mentioning that until later.

> Ctrl+Break stops it instantly, but then the C libraries don't get a
> chance to clean up (like Unix kill -9).

> The Windows Service shutdown code in Zope3 also does a "very hard 
> kill" (a Win32 TerminateProcess()).

All very true.  I think you'll also agree that it doesn't pose any 
particular danger during development.

> Well, the Z3 Windows Service shutdown code isn't wholly safe, ditto 
> Ctrl+Break

If you're referring to the fact that Python's shutdown code (including 
calling atexit registered functions) don't get run in those instances, 
then I would agree that it "isn't wholly safe".

I'd also say that it isn't very smart to do that in a production 
environment, but we're talking about development, and I don't see a 
problem there (and haven't yet, as that's how I always shut down Zope 3 
on Windows)

<snip code>
> appears to be the same thing the Z3 "Shutdown server" button does, and
> at least lets Python exit cleanly.

Right.
-- 
Benji York
Senior Software Engineer
Zope Corporation


More information about the Zope3-dev mailing list