[PATCH] Fix tst-cancel2{0,1}
Jakub Jelinek
jakub@redhat.com
Tue Mar 9 21:55:00 GMT 2004
Hi!
in_sh_body needs to be cleared before each round, otherwise a thread
could be cancelled in the second and following runs even if the needed
pthread_cleanup_push'es have not been done.
2004-03-09 Jakub Jelinek <jakub@redhat.com>
* tst-cancel20.c (do_one_test): Clear in_sh_body first.
* tst-cancel21.c (do_one_test): Likewise.
Reported by Gordon Jin <gordon.jin@intel.com>.
--- libc/nptl/tst-cancel21.c.jj 2003-12-19 02:31:58.000000000 +0100
+++ libc/nptl/tst-cancel21.c 2004-03-09 22:26:46.340191561 +0100
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jakub@redhat.com>, 2003.
@@ -162,7 +162,10 @@ tf (void *arg)
static int
do_one_test (void)
{
- pid_t pid = fork ();
+ pid_t pid;
+
+ in_sh_body = 0;
+ pid = fork ();
if (pid == -1)
{
--- libc/nptl/tst-cancel20.c.jj 2003-12-19 02:31:18.000000000 +0100
+++ libc/nptl/tst-cancel20.c 2004-03-09 22:25:33.354230168 +0100
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jakub@redhat.com>, 2003.
@@ -105,6 +105,7 @@ tf (void *arg)
static int
do_one_test (void)
{
+ in_sh_body = 0;
cleanups = 0;
if (pipe (fd) != 0 || pipe (fd + 2) != 0)
{
Jakub
More information about the Libc-hacker
mailing list