Red Hat Bugzilla – Bug 431928
Clean shutdown of broker.
Last modified: 2009-05-07 16:09:31 EDT
Description of problem:
src/qpidd.cpp defines a signal handler to shut down the broker, however
calling Broker::shutdown() directly from the handler is not async-signal safe.
The handler should push a shutdown event into the
epoll poller (making sure to use only async-safe functions!)
and let a poller thread actually do the shutdown.
Requires extension of the Poller to allow polling for non-socket events,
e.g. allow arbitrary file descriptors.
Better solution from astitcher: stopping the poller is async-signal safe, and
causes main() to return so the Broker dtor is called. Move all other shutdown
code (logging, management shutdown) to the broker dtor or to main() after
Fixed in qpidd-0.2-24.el5, qpidc-0.2-24.el5, and rhm-0.2-18.el5