blob: 75e8a1a167d67f6df22039d3398bd964fbd894cd [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
Stephan Pleinesf63bde82024-01-13 15:59:33 -08004namespace aos::testing {
Brian Silvermanf5f8d8e2015-12-06 18:39:12 -05005
6// Registers an exit handler (using atexit(3)) which will call _exit(2).
7// Intended to be called in a freshly fork(2)ed process where it will run before
8// any other exit handlers that were already registered and prevent them from
9// being run.
10void PreventExit();
11
Stephan Pleinesf63bde82024-01-13 15:59:33 -080012} // namespace aos::testing
Brian Silvermanf5f8d8e2015-12-06 18:39:12 -050013
14#endif // AOS_TESTING_PREVENT_EXIT_H_