You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ac...@apache.org on 2008/02/07 22:06:07 UTC

svn commit: r619636 - /incubator/qpid/trunk/qpid/cpp/src/qpidd.cpp

Author: aconway
Date: Thu Feb  7 13:06:01 2008
New Revision: 619636

URL: http://svn.apache.org/viewvc?rev=619636&view=rev
Log:
Removed signal-unsafe code from shutdown handler. 

Modified:
    incubator/qpid/trunk/qpid/cpp/src/qpidd.cpp

Modified: incubator/qpid/trunk/qpid/cpp/src/qpidd.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpidd.cpp?rev=619636&r1=619635&r2=619636&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpidd.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpidd.cpp Thu Feb  7 13:06:01 2008
@@ -120,9 +120,21 @@
 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 {