qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acon...@apache.org
Subject svn commit: r959661 - /qpid/trunk/qpid/cpp/src/posix/QpiddBroker.cpp
Date Thu, 01 Jul 2010 13:47:11 GMT
Author: aconway
Date: Thu Jul  1 13:47:11 2010
New Revision: 959661

URL: http://svn.apache.org/viewvc?rev=959661&view=rev
Log:
Ensure broker is deleted in main thread, not by global destructors.

Fixes core dumps during shutdown.

Modified:
    qpid/trunk/qpid/cpp/src/posix/QpiddBroker.cpp

Modified: qpid/trunk/qpid/cpp/src/posix/QpiddBroker.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/posix/QpiddBroker.cpp?rev=959661&r1=959660&r2=959661&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/posix/QpiddBroker.cpp (original)
+++ qpid/trunk/qpid/cpp/src/posix/QpiddBroker.cpp Thu Jul  1 13:47:11 2010
@@ -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 *
         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;
 }



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org


Mime
View raw message