From: Mark Janes Date: Mon, 18 Aug 2014 22:50:04 +0000 (-0700) Subject: Re-enable termination message at exit. X-Git-Url: https://git.cworth.org/git?p=fips;a=commitdiff_plain;h=dfb96c9b64def8674a38dda2bc2276d4e2cdd58e Re-enable termination message at exit. The fips unit tests ("make check") rely on a termination message to verify that the target application was successfully pre-loaded. This termination message was inadvertently lost in the refactor of commit b0e640a505171550746af20e940076c579a0e638 . --- diff --git a/metrics.c b/metrics.c index 71e2164..a3b86e2 100644 --- a/metrics.c +++ b/metrics.c @@ -764,6 +764,12 @@ metrics_collect_available (metrics_t *metrics) } } +static void +metrics_exit (void) +{ + if (verbose) + printf ("fips: terminating\n"); +} void metrics_end_frame (metrics_t *metrics) @@ -773,6 +779,7 @@ metrics_end_frame (metrics_t *metrics) if (! initialized) { gettimeofday (&tv_start, NULL); + atexit (metrics_exit); if (getenv ("FIPS_VERBOSE")) verbose = 1; initialized = 1;