diff mbox series

[v3,01/21] nptl: Handle EPIPE on tst-cancel2

Message ID 20191014205656.29834-2-adhemerval.zanella@linaro.org
State New
Headers show
Series nptl: Fix Race conditions in pthread cancellation (BZ#12683) | expand

Commit Message

Adhemerval Zanella Oct. 14, 2019, 8:56 p.m. UTC
The SIGPIPE can be catched before SIGCANCEL, which makes write fail
and the thread return an non expected result.

Checked on x86_64-linux-gnu and powerpc64le-linux-gnu.
---
 nptl/tst-cancel2.c | 3 ---
 1 file changed, 3 deletions(-)

-- 
2.17.1

Comments

Florian Weimer Oct. 15, 2019, 9:02 a.m. UTC | #1
* Adhemerval Zanella:

> The SIGPIPE can be catched before SIGCANCEL, which makes write fail

> and the thread return an non expected result.

>

> Checked on x86_64-linux-gnu and powerpc64le-linux-gnu.

> ---

>  nptl/tst-cancel2.c | 3 ---

>  1 file changed, 3 deletions(-)

>

> diff --git a/nptl/tst-cancel2.c b/nptl/tst-cancel2.c

> index b22bd496a7..2df2c00578 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");


Commit subject and message no longer match.

nptl/tst-cancel3.c needs the same change, I think.

Thanks,
Florian
diff mbox series

Patch

diff --git a/nptl/tst-cancel2.c b/nptl/tst-cancel2.c
index b22bd496a7..2df2c00578 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");