From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 89559 invoked by alias); 17 Oct 2019 13:56:52 -0000 Mailing-List: contact glibc-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: , Sender: glibc-cvs-owner@sourceware.org List-Subscribe: Received: (qmail 89488 invoked by uid 9943); 17 Oct 2019 13:56:52 -0000 Date: Thu, 17 Oct 2019 13:56:00 -0000 Message-ID: <20191017135652.89487.qmail@sourceware.org> Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Adhemerval Zanella To: glibc-cvs@sourceware.org Subject: [glibc/azanella/bz12683] nptl: Do not close the pipe on tst-cancel{2, 3} X-Act-Checkin: glibc X-Git-Author: Adhemerval Zanella X-Git-Refname: refs/heads/azanella/bz12683 X-Git-Oldrev: e7c8ffe4ec059da1523c093d6a240cd87d154df2 X-Git-Newrev: 5bbe6f7a7817666adc6db625a9929b375361c194 X-SW-Source: 2019-q4/txt/msg00075.txt.bz2 https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=5bbe6f7a7817666adc6db625a9929b375361c194 commit 5bbe6f7a7817666adc6db625a9929b375361c194 Author: Adhemerval Zanella 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");