[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Problems with PERL 5.10 and system pipe



+ Damyan Ivanov <dmn@debian.org>:

> (i.e. no hang even on reads)
> And this doesn't read from the pipe even if I do "echo some > test"
> beforehand. Something is not right.

O_NONBLOCK means non-blocking I/O at all, even for read.

This works as expected:

$ perl -MFcntl -we 'use autodie; use strict; sysopen(PH, "test",
  O_NONBLOCK); while (1) { print readline(PH); sleep 1 }'

And afterwards:

$ echo foobar > test

HTH

-- 
Alex Muntada <alexm@alexm.org>
http://alexm.org/


Reply to: