summaryrefslogtreecommitdiffstats
path: root/src/vlib/unix
diff options
context:
space:
mode:
Diffstat (limited to 'src/vlib/unix')
-rwxr-xr-xsrc/vlib/unix/main.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/vlib/unix/main.c b/src/vlib/unix/main.c
index ed909b65feb..82de8ec7632 100755
--- a/src/vlib/unix/main.c
+++ b/src/vlib/unix/main.c
@@ -139,6 +139,17 @@ unix_signal_handler (int signum, siginfo_t * si, ucontext_t * uc)
break;
}
+#ifdef CLIB_GCOV
+ /*
+ * Test framework sends SIGTERM, so we need to flush the
+ * code coverage stats here.
+ */
+ {
+ void __gcov_flush (void);
+ __gcov_flush ();
+ }
+#endif
+
/* Null terminate. */
vec_add1 (syslog_msg, 0);