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/signalhandler.cc b/third_party/google-glog/src/signalhandler.cc
index c3a0f80..049efa5 100644
--- a/third_party/google-glog/src/signalhandler.cc
+++ b/third_party/google-glog/src/signalhandler.cc
@@ -308,6 +308,14 @@
sleep(1);
}
}
+
+ {
+ // Put this back on SCHED_OTHER by default.
+ struct sched_param param;
+ param.sched_priority = 0;
+ sched_setscheduler(0, SCHED_OTHER, ¶m);
+ }
+
// This is the first time we enter the signal handler. We are going to
// do some interesting stuff from here.
// TODO(satorux): We might want to set timeout here using alarm(), but