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 | f8e567e234e6fc331c3863f87e806cb96307d5d4 (patch) | |
| tree | 8f58bb373b5b347e6e2ee3d123e0e17f6cabcda9 /cpp | |
| parent | 7c1ffb29e68e7a0b10ea380cd5a40892f8ddc653 (diff) | |
| download | qpid-python-f8e567e234e6fc331c3863f87e806cb96307d5d4.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
Diffstat (limited to 'cpp')
| -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; } |
