Skip to content

Commit 01bc7d4

Browse files
committed
Application::Exit(): don't exit(), but _exit(), even in debug build mode
Case: 1. icinga2 api setup 2. icinga2 daemon -C -x debug Before: Second commands crashes at exit. After: No crash. As the comment between the removed lines clearly says: Our destructors haven't been built for static data. This is build type independent.
1 parent 643e9cd commit 01bc7d4

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

lib/base/application.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,11 +112,7 @@ void Application::Exit(int rc)
112112
}
113113

114114
UninitializeBase();
115-
#ifdef I2_DEBUG
116-
exit(rc);
117-
#else /* I2_DEBUG */
118115
_exit(rc); // Yay, our static destructors are pretty much beyond repair at this point.
119-
#endif /* I2_DEBUG */
120116
}
121117

122118
void Application::InitializeBase()

0 commit comments

Comments
 (0)