diff options
author | Alan Conway <aconway@apache.org> | 2010-07-01 13:47:11 +0000 |
---|---|---|
committer | Alan Conway <aconway@apache.org> | 2010-07-01 13:47:11 +0000 |
commit | b8c7e4ad5e57e080ad644ad919c2d2ee128bb3d0 (patch) | |
tree | 8f58bb373b5b347e6e2ee3d123e0e17f6cabcda9 | |
parent | 1eff142e7e5da8a255d1d103316e5e0f9078f4f8 (diff) | |
download | qpid-python-b8c7e4ad5e57e080ad644ad919c2d2ee128bb3d0.tar.gz |
Ensure broker is deleted in main thread, not by global destructors.
Fixes core dumps during shutdown.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@959661 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | cpp/src/posix/QpiddBroker.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/cpp/src/posix/QpiddBroker.cpp b/cpp/src/posix/QpiddBroker.cpp index 7eef187ded..b340e3e52b 100644 --- a/cpp/src/posix/QpiddBroker.cpp +++ b/cpp/src/posix/QpiddBroker.cpp @@ -128,6 +128,7 @@ struct QpiddDaemon : public Daemon { uint16_t port=brokerPtr->getPort(options->daemon.transport); ready(port); // Notify parent. brokerPtr->run(); + broker::SignalHandler::setBroker(0); // Delete broker in this thread. } }; @@ -174,6 +175,7 @@ int QpiddBroker::execute (QpiddOptions *options) { if (options->broker.port == 0 || myOptions->daemon.transport != TCP) cout << uint16_t(brokerPtr->getPort(myOptions->daemon.transport)) << endl; brokerPtr->run(); + broker::SignalHandler::setBroker(0); // Delete broker in this thread. } return 0; } |