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

Owner: Nobody
Requestors: bartolin [at] gmx.de
Cc:
AdminCc:

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



Subject: [JVM] When reading from stdin, eof is not respected
Date: Sun, 28 May 2017 22:03:52 +0200
From: Christian Bartolomaeus <bartolin [...] gmx.de>
To: rakudobug [...] perl.org
Currently rakudo on JVM does not respect eof when reading from stdin. bartolin_ r: .say for lines() camelia rakudo-moar 094e77: OUTPUT: «»Wann treffen wir drei wieder zusamm?«␤ »Um die siebente Stund‘, am Brückendamm.«␤ »Am Mittelpfeiler.«␤ »Ich lösche die Flamm.«␤ »Ich mit«␤␤ »Ich komme vom Norden her.«␤ »Und ich vom Süden.«…» ..rakudo-jvm 094e77: OUTPUT: «␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤…» For further discussion see https://irclog.perlgeek.de/perl6-dev/2017-05-27#i_14645528 I've fudged some tests in roast that were hanging due to this problem and I'll add this ticket number to the fudge message. Also, I'll disable S19-command-line/repl.t in t/spectest.data. Those changes should be reverted, once the problem is solved.
RT-Send-CC: perl6-compiler [...] perl.org
Download (untitled) / with headers
text/plain 1.6k
On Sun, 28 May 2017 13:09:18 -0700, bartolin@gmx.de wrote: Show quoted text
> Currently rakudo on JVM does not respect eof when reading from stdin. > > bartolin_ r: .say for lines() > camelia rakudo-moar 094e77: OUTPUT: «»Wann treffen wir drei > wieder zusamm?«␤ »Um die siebente Stund‘, am Brückendamm.«␤ »Am > Mittelpfeiler.«␤ »Ich lösche die Flamm.«␤ »Ich mit«␤␤ »Ich > komme vom Norden her.«␤ »Und ich vom Süden.«…» > ..rakudo-jvm 094e77: OUTPUT: > «␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤…» > > For further discussion see https://irclog.perlgeek.de/perl6-dev/2017- > 05-27#i_14645528 > > I've fudged some tests in roast that were hanging due to this problem > and I'll add this ticket number to the fudge message. Also, I'll > disable S19-command-line/repl.t in t/spectest.data. > > Those changes should be reverted, once the problem is solved.
Some of the mentioned tests are passing again (unfudged with https://github.com/perl6/roast/commit/9ba8d28315). Also S19-command-line/repl.t is enabled for the JVM backend again: https://github.com/rakudo/rakudo/commit/90303c1e3e Unfortunately, there is still something wrong with some tests in S32-io/pipe.t (and maybe elsewhere). I think it could be caused by nqp::readfh on stdin only returning when eof is encountered or 0x100000 bytes are read: https://github.com/rakudo/rakudo/blob/90303c1e3ec9b9b5f6aaef50bed85b4a9ff6455f/src/core/IO/Handle.pm6#L280


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