Disable coredumps by default
They consume a large amount of the CPU on the roboRIO. This is grinding
it down to a halt and causing cascading failures right now. It is a
flag now, so it is easy to change.
Change-Id: I1e09c2de731c12975de2de41fba74dd904a1f15c
diff --git a/aos/init.cc b/aos/init.cc
index 5d62868..c40f22c 100644
--- a/aos/init.cc
+++ b/aos/init.cc
@@ -24,6 +24,8 @@
using FLAG__namespace_do_not_use_directly_use_DECLARE_double_instead::
FLAGS_tcmalloc_release_rate;
+DEFINE_bool(coredump, false, "If true, write core dumps on failure.");
+
namespace aos {
namespace logging {
namespace internal {
@@ -39,7 +41,9 @@
// non-realtime initialization sequences. May be called twice.
void InitStart() {
::aos::logging::Init();
- WriteCoreDumps();
+ if (FLAGS_coredump) {
+ WriteCoreDumps();
+ }
google::InstallFailureSignalHandler();
}