Brian Silverman | f5f8d8e | 2015-12-06 18:39:12 -0500 | [diff] [blame] | 1 | #ifndef AOS_TESTING_PREVENT_EXIT_H_ |
| 2 | #define AOS_TESTING_PREVENT_EXIT_H_ |
| 3 | |
| 4 | namespace aos { |
| 5 | namespace 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. |
| 11 | void PreventExit(); |
| 12 | |
| 13 | } // namespace testing |
| 14 | } // namespace aos |
| 15 | |
| 16 | #endif // AOS_TESTING_PREVENT_EXIT_H_ |