]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Fix timer_create to initialize timer_t properly.
authorSuzuki Poulose <suzuki@in.ibm.com>
Thu, 3 Sep 2009 02:58:50 +0000 (19:58 -0700)
committerPetr Baudis <pasky@suse.cz>
Fri, 18 Sep 2009 18:09:50 +0000 (20:09 +0200)
(cherry picked from commit 38eb61366303c2857f1b00785757bc21da983d70)

nptl/ChangeLog
nptl/sysdeps/unix/sysv/linux/timer_create.c

index 2f5f74eb932c5ed4b866882dd4d9d1d41c968a21..faeb166e9a99c3fa192adac6a880770d921cb8e6 100644 (file)
@@ -1,3 +1,11 @@
+2009-09-02  Suzuki K P  <suzuki@in.ibm.com>
+           Joseph Myers  <joseph@codesourcery.com>
+
+       [BZ #7094]
+       * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
+       Initialize the sigev_notify field for newly created timer to make sure
+       the timer gets deleted from the active timer's list upon timer_delete.  
+
 2009-08-27  Andrew Stubbs  <ams@codesourcery.com>
 
        * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
index a07234d7d17eec4d0a1f5e41f0f9e23bda84236b..cdf127cb4411e4f5da39f41a829c3e6795bc01b2 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003,2004, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2003,2004, 2007, 2009 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2003.
 
@@ -167,6 +167,7 @@ timer_create (clock_id, evp, timerid)
              /* Copy the thread parameters the user provided.  */
              newp->sival = evp->sigev_value;
              newp->thrfunc = evp->sigev_notify_function;
+             newp->sigev_notify = SIGEV_THREAD;
 
              /* We cannot simply copy the thread attributes since the
                 implementation might keep internal information for