Core dump on SCHED_OTHER
This was happening on the RT scheduler and causing significant problems
when a process would crash.
Change-Id: Idec897f43daaf835a601c8a77dfe7f9bfafd62da
diff --git a/third_party/google-glog/src/logging.cc b/third_party/google-glog/src/logging.cc
index ad4047d..2bfce3d 100644
--- a/third_party/google-glog/src/logging.cc
+++ b/third_party/google-glog/src/logging.cc
@@ -1459,6 +1459,13 @@
// someone else can use them (as long as they flush afterwards)
if (data_->severity_ == GLOG_FATAL && exit_on_dfatal) {
if (data_->first_fatal_) {
+ {
+ // Put this back on SCHED_OTHER by default.
+ struct sched_param param;
+ param.sched_priority = 0;
+ sched_setscheduler(0, SCHED_OTHER, ¶m);
+ }
+
// Store crash information so that it is accessible from within signal
// handlers that may be invoked later.
RecordCrashReason(&crash_reason);