Startup code should honor shutdown flag more efficiently

Bug #271763 reported by Fred Drake
2
Affects Status Importance Assigned to Milestone
Zope 3
Won't Fix
Undecided
Unassigned
zope.app.server
Confirmed
Wishlist
Unassigned

Bug Description

The startup code in zope.app.server.main.setup() doesn't consider the possibility that the database opened event might trigger application code that wants to stop the server. The exit_status flag should be checked after any operation in setup that might trigger application code. In particular, the servers should not be started if exit_status has been set. (Even opening the databases might cause a shutdown request.)

For example, a generation that fails and can't allow the database to be used for normal request processing may want to shutdown; it should be able to use zope.app.applicationcontrol.interfaces.IServerControl.shutdown(0) to cancel the startup. By calling shutdown(0) and then sys.exit(), the generation will be cancelled and, eventually, the process will exit.

Changed in zope3:
status: New → Won't Fix
Changed in zope.app.server:
importance: Undecided → Wishlist
Revision history for this message
Christian Theune (ctheune) wrote :

Sounds like a good idea to me.

Changed in zope.app.server:
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.