[perl #61290] [BIG] can't peek on stdin

François PERRAD via RT bugs-parrot-track at netlabs.develooper.com
Wed Dec 24 10:39:30 UTC 2008


On Tue Dec 23 14:08:43 2008, chromatic at wgz.org wrote:
> On Thursday 11 December 2008 06:14:36 François PERRAD wrote:
> 
> > Since the merge of the branch ppd22io, the mode of the stdin stream
> has
> > changed. Currently, it isn't possible to peek on stdin.
> >
> > $ cat peek.pir
> >     .sub 'main'
> >          $P0 = getstdin
> >          $S0 = peek $S0
> >     .end
> >
> > $ ./parrot peek.pir < peek.pir
> >     Can't peek at unbuffered I/O
> >
> > The issue was detected with I/O library of Lua (see
> > languages/lua/t/io.t#17).
> 
> We should support this; how about upgrading the IO PMC to buffered
> reads when
> we detect a peek?  Here's a patch that makes the test pass for me.
> Any
> objections, anyone else?
> 

The patch works on Win32.
Great.

François.

> -- c
> 
> 





More information about the parrot-dev mailing list