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