In perl.git, the branch blead has been updated

<https://perl5.git.perl.org/perl.git/commitdiff/293a533c53d9c0fe939e23c439f4dfc47a5736dc?hp=0be0ef8f515958d475928ee7f95d06eb27ed16e8>

- Log -----------------------------------------------------------------
commit 293a533c53d9c0fe939e23c439f4dfc47a5736dc
Author: Tony Cook <[email protected]>
Date:   Tue Jun 25 15:47:57 2019 +1000

    (perl #122112) make sure SIGPIPE is delivered if we test it

-----------------------------------------------------------------------

Summary of changes:
 t/io/pipe.t | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/t/io/pipe.t b/t/io/pipe.t
index 9f5bb3bcf8..bdf743c26c 100644
--- a/t/io/pipe.t
+++ b/t/io/pipe.t
@@ -125,6 +125,18 @@ wait;                              # Collect from $pid
 pipe(READER,WRITER) || die "Can't open pipe";
 close READER;
 
+eval {
+    # one platform at least appears to block SIGPIPE by default (see #122112)
+    # so make sure it's unblocked.
+    # The eval wrapper should ensure this does nothing if these aren't
+    # implemented.
+    require POSIX;
+    my $mask = POSIX::SigSet->new(POSIX::SIGPIPE());
+    my $old = POSIX::SigSet->new();
+    POSIX::sigprocmask(POSIX::SIG_UNBLOCK(), $mask, $old);
+    note "Yes, SIGPIPE was blocked" if $old->ismember(POSIX::SIGPIPE());
+};
+
 $SIG{'PIPE'} = 'broken_pipe';
 
 sub broken_pipe {

-- 
Perl5 Master Repository

Reply via email to