This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
[glibc/azanella/bz12683] nptl: Do not close the pipe on tst-cancel{2, 3}
- From: Adhemerval Zanella <azanella at sourceware dot org>
- To: glibc-cvs at sourceware dot org
- Date: 17 Oct 2019 13:56:52 -0000
- Subject: [glibc/azanella/bz12683] nptl: Do not close the pipe on tst-cancel{2, 3}
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=5bbe6f7a7817666adc6db625a9929b375361c194
commit 5bbe6f7a7817666adc6db625a9929b375361c194
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Thu Aug 15 09:06:24 2019 -0300
nptl: Do not close the pipe on tst-cancel{2,3}
This can cause a SIGPIPE before SIGCANCEL is processed, which makes
write fail and the thread return an non expected result.
Checked on x86_64-linux-gnu and powerpc64le-linux-gnu.
Diff:
---
nptl/tst-cancel2.c | 3 ---
nptl/tst-cancel3.c | 3 ---
2 files changed, 6 deletions(-)
diff --git a/nptl/tst-cancel2.c b/nptl/tst-cancel2.c
index b22bd49..2df2c00 100644
--- a/nptl/tst-cancel2.c
+++ b/nptl/tst-cancel2.c
@@ -73,9 +73,6 @@ do_test (void)
return 1;
}
- /* This will cause the write in the child to return. */
- close (fd[0]);
-
if (pthread_join (th, &r) != 0)
{
puts ("join failed");
diff --git a/nptl/tst-cancel3.c b/nptl/tst-cancel3.c
index ea595ba..1822adf 100644
--- a/nptl/tst-cancel3.c
+++ b/nptl/tst-cancel3.c
@@ -75,9 +75,6 @@ do_test (void)
return 1;
}
- /* This will cause the read in the child to return. */
- close (fd[0]);
-
if (pthread_join (th, &r) != 0)
{
puts ("join failed");