]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Fix interception of pthread_atfork with glibc-2.3.2.
authorJulian Seward <jseward@acm.org>
Sun, 4 May 2003 12:35:54 +0000 (12:35 +0000)
committerJulian Seward <jseward@acm.org>
Sun, 4 May 2003 12:35:54 +0000 (12:35 +0000)
MERGE TO STABLE

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1587

coregrind/arch/x86-linux/vg_libpthread.c
coregrind/vg_libpthread.c

index 6b066f3062fa6cc143982469337e0b0b27e2aa89..b477077af28ebdce4e8fe277a2f337004442c9bf 100644 (file)
@@ -1562,6 +1562,16 @@ int __pthread_atfork ( void (*prepare)(void),
 }
 
 
+#ifdef GLIBC_2_3
+/* This seems to be a hook which appeared in glibc-2.3.2. */
+int __register_atfork ( void (*prepare)(void),
+                        void (*parent)(void),
+                        void (*child)(void) )
+{
+   return __pthread_atfork(prepare,parent,child);
+}
+#endif
+
 WEAK 
 void __pthread_initialize ( void )
 {
index 6b066f3062fa6cc143982469337e0b0b27e2aa89..b477077af28ebdce4e8fe277a2f337004442c9bf 100644 (file)
@@ -1562,6 +1562,16 @@ int __pthread_atfork ( void (*prepare)(void),
 }
 
 
+#ifdef GLIBC_2_3
+/* This seems to be a hook which appeared in glibc-2.3.2. */
+int __register_atfork ( void (*prepare)(void),
+                        void (*parent)(void),
+                        void (*child)(void) )
+{
+   return __pthread_atfork(prepare,parent,child);
+}
+#endif
+
 WEAK 
 void __pthread_initialize ( void )
 {