Re: problem with Gtk2::Helper & STDOUT

Landry Breuil <landry rhaalovely net> writes:

current process STDOUT.

I don't think add_watch is geared to that.  Something like IO::Capture
that gets under the perl file handle might be what you want.  Except
IO::Capture and others seem geared towards holding the output rather
than making a callback immediately.  Your own tie() of STDOUT might be
the way, maybe a bit tricky.

Matthew Braid <ptkperl mdb id au> writes:

If you mapped STDOUT to a seekable read/write filehandle

Maybe a pipe with STDOUT on the write end, and add_watch on the read
end.  It'd have the advantage of getting any direct C code writes too.
Except I suppose it'd be deadlocked if writing more than PIPE_BUF before
the main loop gets a chance to read it back.

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