mesos-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b...@apache.org
Subject svn commit: r1396889 - /incubator/mesos/trunk/src/logging/logging.cpp
Date Thu, 11 Oct 2012 01:24:33 GMT
Author: benh
Date: Thu Oct 11 01:24:32 2012
New Revision: 1396889

URL: http://svn.apache.org/viewvc?rev=1396889&view=rev
Log:
Fixed bug where masters/slaves can get defunct because the static
'Once' instance in logging.cpp attempts to get destructed (fix is to
put it on the heap).

Modified:
    incubator/mesos/trunk/src/logging/logging.cpp

Modified: incubator/mesos/trunk/src/logging/logging.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/logging/logging.cpp?rev=1396889&r1=1396888&r2=1396889&view=diff
==============================================================================
--- incubator/mesos/trunk/src/logging/logging.cpp (original)
+++ incubator/mesos/trunk/src/logging/logging.cpp Thu Oct 11 01:24:32 2012
@@ -140,9 +140,9 @@ private:
 
 void initialize(const string& _argv0, const Flags& flags)
 {
-  static Once initialized;
+  static Once* initialized = new Once();
 
-  if (initialized.once()) {
+  if (initialized->once()) {
     return;
   }
 
@@ -178,7 +178,7 @@ void initialize(const string& _argv0, co
   // exits (i.e., use a supervisor which re-spawns appropriately).
   spawn(new LoggingProcess(), true);
 
-  initialized.done();
+  initialized->done();
 }
 
 } // namespace logging {



Mime
View raw message