[Pdx-pm] Reading process output fails prematurely?
chromatic at wgz.org
Thu Mar 5 11:47:14 PST 2009
On Thursday 05 March 2009 10:00:24 Scott Garman wrote:
> A second quick question, if I haven't burned up too much karma: the
> script works properly now, except that it buffers many lines (50+) from
> udevmonitor before I see them on the screen. Setting $| to 1 was no
> help, and from the documentation sounds like it wasn't quite what I
> wanted anyway (autoflush forces buffer flushes after writes to the
> currently selected output handle, and I'm guessing that input buffering
> is what's causing me trouble).
Input buffering may be problematic if you use readline() (<$events>).
sysread() may work better.
Of course, this all depends on if udevmonitor uses buffered *writes*. If so,
whatever you do for input won't help.
More information about the Pdx-pm-list