blob: ee39fdb1b56c49221da4cb33ea626a8955ecebd0 [file] [log] [blame]
Brian Silvermanf5f8d8e2015-12-06 18:39:12 -05001#ifndef AOS_TESTING_PREVENT_EXIT_H_
2#define AOS_TESTING_PREVENT_EXIT_H_
3
4namespace aos {
5namespace testing {
6
7// Registers an exit handler (using atexit(3)) which will call _exit(2).
8// Intended to be called in a freshly fork(2)ed process where it will run before
9// any other exit handlers that were already registered and prevent them from
10// being run.
11void PreventExit();
12
13} // namespace testing
14} // namespace aos
15
16#endif // AOS_TESTING_PREVENT_EXIT_H_