Browse Source

[3407] Added workaround for SignalSet bug, see Trac #3470

Added workaround to DControllerBase to explicitly clear
its SignalSet before exiting launch().
SignalSets can outlive their static lists which can cause
destructing them as part of process exit segfault.
Once this is fixed under #3470 the workaround can be removed.
Thomas Markwalder 11 years ago
parent
commit
d66abdf479
1 changed files with 6 additions and 0 deletions
  1. 6 0
      src/bin/d2/d_controller.cc

+ 6 - 0
src/bin/d2/d_controller.cc

@@ -103,6 +103,12 @@ DControllerBase::launch(int argc, char* argv[], const bool test_mode) {
                    "Application process event loop failed: " << ex.what());
     }
 
+    /// @todo Once Trac #3470 is addressed this will not be necessary.
+    /// SignalSet uses statics which do not free in predicatable order.
+    if (signal_set_) {
+        signal_set_->clear();
+    }
+
     // All done, so bail out.
     LOG_INFO(dctl_logger, DCTL_STOPPING).arg(app_name_);
 }