# New Ticket Created by  Christian Bartolomaeus 
# Please include the string:  [perl #123563]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=123563 >


Looking at test reports from testers.perl6.org ugexe++ found a bug with pipe() 
on FreeBSD. It looks like closing the returned handle happens too early, as 
shown by the third of following commands:

$ perl6 -e 'my $cmd = "/usr/bin/false"; say shell("$cmd")'   ## expected result
Proc::Status.new(exit => 1, pid => Any, signal => 0)

$ perl6 -e 'my $cmd = "/usr/bin/false"; my $handle = pipe("$cmd", :r); sleep 2; 
say $handle.close' ## same
Proc::Status.new(exit => 1, pid => Any, signal => 0)

$ perl6 -e 'my $cmd = "/usr/bin/false"; my $handle = pipe("$cmd", :r); say 
$handle.close'  ## wrong
Proc::Status.new(exit => 0, pid => Any, signal => 0)

On a linux box it's 'exit => 1' in all three cases.

Panda currently uses a command like this for it's test and build reports. Panda 
issue 130 (https://github.com/tadzik/panda/issues/130) hase some more context.

I've tested the above with rakudo.moar only.

Reply via email to