fixed netconsole getting junk from other robots
diff --git a/aos/linux_code/init.cc b/aos/linux_code/init.cc
index 240a9d3..d05df77 100644
--- a/aos/linux_code/init.cc
+++ b/aos/linux_code/init.cc
@@ -43,9 +43,7 @@
void InitStart() {
// Allow locking as much as we want into RAM.
SetSoftRLimit(RLIMIT_MEMLOCK, RLIM_INFINITY, false);
-
- // Do create core files of unlimited size.
- SetSoftRLimit(RLIMIT_CORE, RLIM_INFINITY, true);
+ WriteCoreDumps();
}
int LockAllMemory() {
@@ -112,4 +110,9 @@
}
}
+void WriteCoreDumps() {
+ // Do create core files of unlimited size.
+ SetSoftRLimit(RLIMIT_CORE, RLIM_INFINITY, true);
+}
+
} // namespace aos