Skip to content
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

File pipe IO problematic #3618

Open
p6rt opened this issue Dec 23, 2014 · 3 comments
Open

File pipe IO problematic #3618

p6rt opened this issue Dec 23, 2014 · 3 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Dec 23, 2014

Migrated from rt.perl.org#123484 (status was 'open')

Searchable as RT123484$

@p6rt
Copy link
Author

p6rt commented Dec 23, 2014

From mickyc@shaw.ca

I have compiled Rakudo Star from the source package and it reports​:
This is perl6 version 2014.09 built on MoarVM version 2014.09

The system fifo read crashes with the error included at the bottom. The
test was done with two scripts in two separate xterm instances.

Thank you for all of the wonderful work.

Michael Chajkowski

** One shell running this​:

my $pipe = 'test_pipe'.IO;
for (1..Inf) -> $iter {
  spurt $pipe, sprintf "This is it %00d\n", $iter;
  sleep 1;
};

** Another shell running this​:

my $pipe = 'test_pipe'.IO;

while 1 {
  $pipe.get.say;
# $pipe.lines.say;
  sleep 1;
}

** Using .get

Failed to seek in filehandle​: 29
  in method eof at src/gen/m-CORE.setting​:14679
  in method get at src/gen/m-CORE.setting​:14687
  in block <unit> at ./test.p6​:11

** Using .lines

Failed to seek in filehandle​: 29
  in code at src/gen/m-CORE.setting​:14716
  in block at src/gen/m-CORE.setting​:8328
  in block at src/gen/m-CORE.setting​:8332
  in method reify at src/gen/m-CORE.setting​:8358
  in method reify at src/gen/m-CORE.setting​:8021
  in method reify at src/gen/m-CORE.setting​:8021
  in method reify at src/gen/m-CORE.setting​:8122
  in method reify at src/gen/m-CORE.setting​:8021
  in method reify at src/gen/m-CORE.setting​:8021
  in method gimme at src/gen/m-CORE.setting​:8508
  in method eager at src/gen/m-CORE.setting​:8482
  in method join at src/gen/m-CORE.setting​:1817
  in method gist at src/gen/m-CORE.setting​:8920
  in sub say at src/gen/m-CORE.setting​:15179
  in method say at src/gen/m-CORE.setting​:1136
  in block <unit> at ./test.p6​:11

@p6rt
Copy link
Author

p6rt commented Dec 24, 2014

From @raydiak

http://irclog.perlgeek.de/perl6/2014-12-23#i_9846422

my $pipe = 'testpipe'.IO;

say $pipe.slurp; # always returns an empty string

my $handle = $pipe.open; # blocks until there is something to read...note 'read' is not called yet

say $handle.read(1); # read works
say $handle.getc(); # getc seems to work
say $handle.getc(1); # "Too many positionals passed"...this one is just a design vs implementation discrepancy?

say $handle.get; # "Failed to seek in filehandle​: 29"
say $handle.lines; # "Failed to seek in filehandle​: 29"
say $handle.eof; # "Failed to seek in filehandle​: 29"

This is perl6 version 2014.12-9-gfb9127c built on MoarVM version 2014.12
Linux 3.16.0-28-generic #​38-Ubuntu SMP Sat Dec 13 16​:13​:28 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

@p6rt
Copy link
Author

p6rt commented Dec 24, 2014

The RT System itself - Status changed from 'new' to 'open'

@p6rt p6rt added the Bug label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant