From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id 422F5385DC12; Fri, 3 Apr 2020 20:23:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 422F5385DC12 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: 607ff11918051b1efb4df3dcf6a8258dfe6b474a X-Git-Newrev: 4b76322d31b7e37ba64ae3f9d93eaf9c2e79b8a9 Message-Id: <20200403202325.422F5385DC12@sourceware.org> Date: Fri, 3 Apr 2020 20:23:25 +0000 (GMT) X-BeenThere: glibc-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Glibc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Apr 2020 20:23:25 -0000 https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=4b76322d31b7e37ba64ae3f9d93eaf9c2e79b8a9 commit 4b76322d31b7e37ba64ae3f9d93eaf9c2e79b8a9 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 1e86711596..1732980b0f 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 0a531dbcdb..3a0acac5e2 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");