about summary refs log tree commit diff
path: root/nptl/sysdeps/unix/sysv/linux/register-atfork.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-03-03 22:02:13 +0000
committerUlrich Drepper <drepper@redhat.com>2003-03-03 22:02:13 +0000
commit4f6f0a8fcff3219a19e860f0c4037d9e5646042c (patch)
treee3762b7a1738b04c266852eee550eddc5a96aef5 /nptl/sysdeps/unix/sysv/linux/register-atfork.c
parentbe095ffaf426d462028b836432ef3ba32d45e3a5 (diff)
downloadglibc-4f6f0a8fcff3219a19e860f0c4037d9e5646042c.tar.gz
glibc-4f6f0a8fcff3219a19e860f0c4037d9e5646042c.tar.xz
glibc-4f6f0a8fcff3219a19e860f0c4037d9e5646042c.zip
Update.
2003-03-03  Ulrich Drepper  <drepper@redhat.com>

	* include/sched.h (__clone2): Use ... instead of adding all the
	new parameters.
Diffstat (limited to 'nptl/sysdeps/unix/sysv/linux/register-atfork.c')
-rw-r--r--nptl/sysdeps/unix/sysv/linux/register-atfork.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/nptl/sysdeps/unix/sysv/linux/register-atfork.c b/nptl/sysdeps/unix/sysv/linux/register-atfork.c
index 7047d6a72a..2f63c781ab 100644
--- a/nptl/sysdeps/unix/sysv/linux/register-atfork.c
+++ b/nptl/sysdeps/unix/sysv/linux/register-atfork.c
@@ -22,6 +22,10 @@
 #include "fork.h"
 
 
+/* Defined in libc_pthread_init.c.  */
+extern struct fork_handler __pthread_child_handler attribute_hidden;
+
+
 int
 __register_atfork (prepare, parent, child, dso_handle)
      void (*prepare) (void);
@@ -114,7 +118,9 @@ libc_freeres_fn (free_mem)
     {
       list_del (runp);
 
-      free (list_entry (runp, struct fork_handler, list));
+      void *p = list_entry (runp, struct fork_handler, list);
+      if (p != (void *) &__pthread_child_handler)
+	free (p);
     }
 
   /* Release the lock.  */