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.
This commit is contained in:
Alexander A. Klimov 2022-08-23 13:12:21 +02:00
parent 643e9cd48b
commit 01bc7d4043
1 changed files with 0 additions and 4 deletions

View File

@ -112,11 +112,7 @@ void Application::Exit(int rc)
}
UninitializeBase();
#ifdef I2_DEBUG
exit(rc);
#else /* I2_DEBUG */
_exit(rc); // Yay, our static destructors are pretty much beyond repair at this point.
#endif /* I2_DEBUG */
}
void Application::InitializeBase()