public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Adhemerval Zanella <azanella@sourceware.org>
To: glibc-cvs@sourceware.org
Subject: [glibc/azanella/bz12683] nptl: Do not close the pipe on tst-cancel{2, 3}
Date: Thu, 17 Oct 2019 13:56:00 -0000	[thread overview]
Message-ID: <20191017135652.89487.qmail@sourceware.org> (raw)

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");


             reply	other threads:[~2019-10-17 13:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-17 13:56 Adhemerval Zanella [this message]
2020-04-03 20:23 Adhemerval Zanella
2020-04-07 14:03 Adhemerval Zanella

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191017135652.89487.qmail@sourceware.org \
    --to=azanella@sourceware.org \
    --cc=glibc-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).