diff --git a/tools/wake/main.cpp b/tools/wake/main.cpp index 1535c23bf..3b139d419 100644 --- a/tools/wake/main.cpp +++ b/tools/wake/main.cpp @@ -21,6 +21,7 @@ #include #include +#include #include #include #include @@ -190,6 +191,14 @@ class TerminalReporter : public DiagnosticReporter { }; int main(int argc, char **argv) { + // Make sure we always get core dumps but don't fail + // if that fails for some reason. + struct rlimit core_lim; + getrlimit(RLIMIT_CORE, &core_lim); + core_lim.rlim_cur = core_lim.rlim_max; + setrlimit(RLIMIT_CORE, &core_lim); + + // Get the start time for wake auto start = std::chrono::steady_clock::now(); TerminalReporter terminalReporter;