Re: Glib::IO->add_watch and reading the filehandle
- From: Kevin Ryde <user42 zip com au>
- To: gtk-perl-list gnome org
- Subject: Re: Glib::IO->add_watch and reading the filehandle
- Date: Thu, 17 Jul 2008 10:19:40 +1000
"Matthew Braid" <ptkperl mdb id au> writes:
opened with IPC::Open2
I've been using Proc::SyncExec because it's got good exec error
reporting. Doesn't look like Open2/Open3 has that, you'd think they
probably should.
I was trying to figure out why the filehandle wasn't being picked up
as 'still readable'
Sounds like it should be right, if nobody else is doing a buffered read.
You could try you own select() in the io handler to see how it looks at
the point you would go back to the main loop. Myself I've been using a
non-blocking pipe or socketpair and reading in the handler until
EWOULDBLOCK.
use Fcntl;
fcntl($FROM_CHILD, F_SETFL, fcntl($FROM_CHILD, F_GETFL, 0) | O_NONBLOCK);
"MYHANDLE->blocking(0)" might be easier (after loading IO::Handle or
whatever package it is that slips in that method).
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]