blob: 7c8da606277dba83ac0e1dc2cfff3c4b05353154 [file] [log] [blame]
#include "aos/testing/prevent_exit.h"
#include <unistd.h>
#include <cstdlib>
#include "glog/logging.h"
namespace aos::testing {
namespace {
void TerminateExitHandler() { _exit(EXIT_SUCCESS); }
} // namespace
void PreventExit() { CHECK_EQ(atexit(TerminateExitHandler), 0); }
} // namespace aos::testing