Re: problem with Gtk2::Helper & STDOUT
- From: Kevin Ryde <user42 zip com au>
- To: Landry Breuil <landry rhaalovely net>
- Cc: gtk-perl-list gnome org
- Subject: Re: problem with Gtk2::Helper & STDOUT
- Date: Sat, 12 Sep 2009 11:44:18 +1000
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.
] [Thread Prev