diff options
author | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2014-07-29 10:22:43 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2014-07-29 12:55:54 +0200 |
commit | ec83c49234a81531ad123e831df2c49a1ac6ebe5 (patch) | |
tree | 65749fabbf355d785552805be67828330b99745a /lib/gnutls_global.c | |
parent | 7a76e94f7c4d1facc8e04dc6158f1dbfd6265a0e (diff) | |
download | gnutls-ec83c49234a81531ad123e831df2c49a1ac6ebe5.tar.gz |
Use pthread_atfork() and variants to detect fork
Diffstat (limited to 'lib/gnutls_global.c')
-rw-r--r-- | lib/gnutls_global.c | 9 |
1 files changed, 9 insertions, 0 deletions
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 <accelerated/cryptodev.h> #include <accelerated/accelerated.h> #include <fips.h> +#include <atfork.h> #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(); |