}
}
+#ifdef COVERAGE
+extern "C"
+{
+ void __gcov_dump(void);
+}
+#endif
+
static void setupLuaConfig(LuaContext& luaCtx, bool client, bool configCheck)
{
typedef LuaAssociativeTable<boost::variant<bool, std::string, LuaArray<std::string>, DownstreamState::checkfunc_t>> newserver_t;
sd_notify(0, "STOPPING=1");
#endif /* HAVE_SYSTEMD */
#if 0
- // Useful for debugging leaks, but might lead to race under load
- // since other threads are still running.
- for(auto& frontend : g_tlslocals) {
- frontend->cleanup();
- }
- g_tlslocals.clear();
- g_rings.clear();
+ // Useful for debugging leaks, but might lead to race under load
+ // since other threads are still running.
+ for (auto& frontend : g_tlslocals) {
+ frontend->cleanup();
+ }
+ g_tlslocals.clear();
+ g_rings.clear();
#endif /* 0 */
+#ifdef COVERAGE
+ __gcov_dump();
+#endif
_exit(0);
});
}
#ifdef COVERAGE
+extern "C"
+{
+ void __gcov_dump(void);
+}
+
static void cleanupLuaObjects()
{
/* when our coverage mode is enabled, we need to make
static void sigTermHandler(int)
{
cleanupLuaObjects();
- exit(EXIT_SUCCESS);
+ __gcov_dump();
+ _exit(EXIT_SUCCESS);
}
#else /* COVERAGE */
static void sigTermHandler(int)