You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by be...@apache.org on 2012/11/04 02:30:30 UTC

svn commit: r1405475 - /incubator/mesos/branches/0.10.0/src/logging/logging.cpp

Author: benh
Date: Sun Nov  4 01:30:30 2012
New Revision: 1405475

URL: http://svn.apache.org/viewvc?rev=1405475&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/branches/0.10.0/src/logging/logging.cpp

Modified: incubator/mesos/branches/0.10.0/src/logging/logging.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/branches/0.10.0/src/logging/logging.cpp?rev=1405475&r1=1405474&r2=1405475&view=diff
==============================================================================
--- incubator/mesos/branches/0.10.0/src/logging/logging.cpp (original)
+++ incubator/mesos/branches/0.10.0/src/logging/logging.cpp Sun Nov  4 01:30:30 2012
@@ -152,9 +152,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;
   }
 
@@ -189,7 +189,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 {