From ec83c49234a81531ad123e831df2c49a1ac6ebe5 Mon Sep 17 00:00:00 2001 From: Nikos Mavrogiannopoulos Date: Tue, 29 Jul 2014 10:22:43 +0200 Subject: Use pthread_atfork() and variants to detect fork --- lib/gnutls_global.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'lib/gnutls_global.c') diff --git a/lib/gnutls_global.c b/lib/gnutls_global.c index 5c832d0328..ae676a2f84 100644 --- a/lib/gnutls_global.c +++ b/lib/gnutls_global.c @@ -33,6 +33,7 @@ #include #include #include +#include #include "gettext.h" @@ -290,6 +291,14 @@ int gnutls_global_init(void) goto out; } +#ifndef _WIN32 + ret = _gnutls_register_fork_handler(); + if (ret < 0) { + gnutls_assert(); + goto out; + } +#endif + _gnutls_register_accel_crypto(); _gnutls_cryptodev_init(); -- cgit v1.2.1