New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
on FreeBSD closing a pipe too early doesn't return the correct exit code #3633
Comments
From @usev6Looking 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 $ perl6 -e 'my $cmd = "/usr/bin/false"; my $handle = pipe("$cmd", :r); sleep 2; say $handle.close' ## same $ perl6 -e 'my $cmd = "/usr/bin/false"; my $handle = pipe("$cmd", :r); say $handle.close' ## wrong 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. |
From @usev6On Wed Jan 07 13:45:39 2015, bartolin@gmx.de wrote:
This seems to be special for Moar: $ perl6-m -e 'my $cmd = "/usr/bin/false"; my $handle = pipe("$cmd", :r); say $handle.close' $ perl6-p -e 'my $cmd = "/usr/bin/false"; my $handle = pipe("$cmd", :r); say $handle.close' $ perl6-j -e 'my $cmd = "/usr/bin/false"; my $handle = pipe("$cmd", :r); say $handle.close' |
1 similar comment
From @usev6On Wed Jan 07 13:45:39 2015, bartolin@gmx.de wrote:
This seems to be special for Moar: $ perl6-m -e 'my $cmd = "/usr/bin/false"; my $handle = pipe("$cmd", :r); say $handle.close' $ perl6-p -e 'my $cmd = "/usr/bin/false"; my $handle = pipe("$cmd", :r); say $handle.close' $ perl6-j -e 'my $cmd = "/usr/bin/false"; my $handle = pipe("$cmd", :r); say $handle.close' |
From @usev6This works now. $ perl6-m -e 'my $handle = pipe("/usr/bin/false", :r); say $handle.close' There are passing tests in S32-io/pipe.t. I'm closing this ticket as 'resolved'. |
1 similar comment
From @usev6This works now. $ perl6-m -e 'my $handle = pipe("/usr/bin/false", :r); say $handle.close' There are passing tests in S32-io/pipe.t. I'm closing this ticket as 'resolved'. |
@usev6 - Status changed from 'new' to 'resolved' |
Migrated from rt.perl.org#123563 (status was 'resolved')
Searchable as RT123563$
The text was updated successfully, but these errors were encountered: