diff options
author | Reinhard Tartler <siretart@tauware.de> | 2020-05-10 19:17:17 -0400 |
---|---|---|
committer | Reinhard Tartler <siretart@tauware.de> | 2020-05-10 19:17:17 -0400 |
commit | 228bc06db9e262b24a6c235b1e036cc8ef78565f (patch) | |
tree | 3703ceb787cf9345600fae3939afeccca7c47719 /infrastructure/buildenv-testmain-template.cpp | |
parent | ffb043c482053896b0190ea5ddc1cf2ba70cb4f0 (diff) | |
parent | c5c04da3823c36f03408821cbc5019ec18613922 (diff) |
Merge commit 'c5c04da3'debian/0.13__git20200326.g8e8b63c-1
Diffstat (limited to 'infrastructure/buildenv-testmain-template.cpp')
-rw-r--r-- | infrastructure/buildenv-testmain-template.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/infrastructure/buildenv-testmain-template.cpp b/infrastructure/buildenv-testmain-template.cpp index d946c25d..6aba82c5 100644 --- a/infrastructure/buildenv-testmain-template.cpp +++ b/infrastructure/buildenv-testmain-template.cpp @@ -44,6 +44,10 @@ #include <list> #include <string> +#ifdef HAVE_OPENSSL_CLEANUP +# include <openssl/crypto.h> +#endif + #include "box_getopt.h" #include "depot.h" #include "Logging.h" @@ -392,6 +396,14 @@ int main(int argc, char * const * argv) { Logging::GetSyslog().Shutdown(); + // On Ubuntu 18.04, initialising OpenSSL 1.1.1 leaves open file handles to + // /dev/[u]random which are not easy to close (the docs for OPENSSL_cleanup + // recommend not to call it), but we want to avoid detecting those as + // leaking file descriptors +#ifdef HAVE_OPENSSL_CLEANUP + OPENSSL_cleanup(); +#endif + bool filesleftopen = !checkfilesleftopen(); fflush(stdout); |