Please Add comments at CleanSignalHandlingDiscussionx.
Contact
Tres Seaver
Problem
The "stop" script we ship with Zope uses (in non-Win32x platforms)
a signal to down the Zope server processes:
kill `cat /path/to/zope/var/Z2.pid`
The Zope process does nothing to arrange for handling this signal
cleanly; hence, it gets taken down hard, without the opportunity
to peform cleanup (e.g., the ZODB.FileStoragex doesn't get a chance
to construct its index).
This proposal is related to the broader one of easing Zope
administration -- see BetterStartStopScriptsx for that problem.
Proposed Solutions
Add signal handling to ZServerx, to permit more uniform control of
the server from the command line. In particular:
Trap the signal.SIGTERM signal, and call the moral equivalent of
manage_shutdown .
Trap the signal.SIGHUP signal, and call the moral equivalent of
manage_restart .
Note
This has been figured out and done for the ZEO storage server.
Risk Factors
Scope
Deliverables
|