diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2016-10-18 02:10:41 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2016-10-18 02:10:41 +0200 |
commit | 05babf965ec39be7e1c8a7306ec1c60b1e614654 (patch) | |
tree | af7f7494e805da3f58312ef3f5a6413a1a907374 /sysdeps | |
parent | f35e6b70ea79b5dc7f5c30dd181b3e7279262bdf (diff) |
Fix unregistering atfork handlers on library unload
* sysdeps/generic/old_pt-atfork.c: New file.
* Makefile (libpthread-routines): Add old_pt-atfork.
(libpthread-static-only-routines): Add pt-atfork.
[build-shared=yes] (install): Explicit $(inst_libdir)/libpthread.so
[build-shared=yes] $(inst_libdir)/libpthread.so: Replace with script to
link libpthread_nonshared.a in.
[build-shared=yes] (tests): Link libpthread_nonshared.a in addition to
libpthread.so.
(generated): Add libpthread_nonshared.a.
Diffstat (limited to 'sysdeps')
-rw-r--r-- | sysdeps/generic/old_pt-atfork.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/sysdeps/generic/old_pt-atfork.c b/sysdeps/generic/old_pt-atfork.c new file mode 100644 index 0000000..5366eaa --- /dev/null +++ b/sysdeps/generic/old_pt-atfork.c @@ -0,0 +1,27 @@ +/* Register fork handlers. Generic version. + Copyright (C) 2002 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include <shlib-compat.h> + +#if SHLIB_COMPAT(libpthread, GLIBC_2_12, GLIBC_2_23) +# define pthread_atfork __dyn_pthread_atfork +# include "pt-atfork.c" +# undef pthread_atfork +compat_symbol (libpthread, __dyn_pthread_atfork, pthread_atfork, GLIBC_2_12); +#endif |