Skip Menu |
Report information
Id: 131608
Status: open
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: jani <frettled [at] gmail.com>
Cc:
AdminCc:

Severity: (no value)
Tag: Bug
Platform: (no value)
Patch Status: (no value)
VM: (no value)



To: rakudobug [...] perl.org
Subject: [BUG] Apparent improper handling of SIGPIPE
From: Jan Ingvoldstad <frettled [...] gmail.com>
Date: Tue, 20 Jun 2017 15:12:46 +0200
Download (untitled) / with headers
text/plain 982b
According to a brief mail discussion on perl6-users (https://www.nntp.perl.org/group/perl.perl6.users/2017/06/msg3905.html and subsequent messages), Rakudo seems to improperly handle piping with e.g. head, and therefore most likely any other kind of external program that would close a pipe. For the sake of bug record keeping, here's the relevant snippet of the discussion. On Fri, Jun 16, 2017 at 12:13 PM, Elizabeth Mattijsen wrote: Show quoted text
> > Failed to write bytes to filehandle: Broken pipe > in block <unit> at -e line 1 > > So it would appear this got fixed by the synchronous IO refactor, and will be available in the 2017.06 release, which is scheduled for tomorrow.
This appears to be only a partial fix with an unexpected outcome. awk, Perl 5, Ruby, etc. do not generate errors for similar use of pipes, and instead use exit status 0. PS: I have not installed the latest Rakudo myself, this just caught my interest, and I was asked to file a rakudobug about it. -- Jan
Download (untitled) / with headers
text/plain 734b
On Tue, 20 Jun 2017 06:12:54 -0700, jani wrote: Show quoted text
> According to a brief mail discussion on perl6-users > (https://www.nntp.perl.org/group/perl.perl6.users/2017/06/msg3905.html > and subsequent messages), Rakudo seems to improperly handle piping > with e.g. head, and therefore most likely any other kind of external > program that would close a pipe. > > For the sake of bug record keeping, here's the relevant snippet of the > discussion.
The problem with the unix default SIGPIPE handling is that while it's very useful for command-line applications, it's most annoying for pretty much anything else (in particular networking applications). Regardless of the default, this needs an easy to use switch to toggle the behavior. Leon


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org