diff options
author | Alan Conway <aconway@apache.org> | 2008-02-07 21:06:01 +0000 |
---|---|---|
committer | Alan Conway <aconway@apache.org> | 2008-02-07 21:06:01 +0000 |
commit | a2fc3dcc8630eccb827699ba76c5ed66a1b018f9 (patch) | |
tree | deb01c22780619e6b3c838f9f129066f364f6d22 /qpid/cpp/src | |
parent | 8b6ceb7a9767fb87e7f432079c443436aae49cd8 (diff) | |
download | qpid-python-a2fc3dcc8630eccb827699ba76c5ed66a1b018f9.tar.gz |
Removed signal-unsafe code from shutdown handler.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@619636 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src')
-rw-r--r-- | qpid/cpp/src/qpidd.cpp | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/qpid/cpp/src/qpidd.cpp b/qpid/cpp/src/qpidd.cpp index f240b45dd8..2a5862a4b9 100644 --- a/qpid/cpp/src/qpidd.cpp +++ b/qpid/cpp/src/qpidd.cpp @@ -120,9 +120,21 @@ struct BootstrapOptions : public qpid::Options { shared_ptr<Broker> brokerPtr; auto_ptr<QpiddOptions> options; -void shutdownHandler(int signal){ - QPID_LOG(notice, "Shutting down on signal " << signal); - brokerPtr->shutdown(); +void shutdownHandler(int /*signal*/){ + // FIXME aconway 2008-02-07: + // https://bugzilla.redhat.com/show_bug.cgi?id=431928 + + // The following commented code is in no + // way async-signal safe and is causing sporadic hangs on + // shutdown. This 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. + + // QPID_LOG(notice, "Shutting down on signal " << signal); + // brokerPtr->shutdown(); + + // For now we just die on the signal, no cleanup. + exit(0); } struct QpiddDaemon : public Daemon { |