Gtk::input_add() for a popen() filehandle?
| From: | James Cameron | Date: | Sun, 31 Mar 2002 12:42:41 +0000 |
| Subject: | Gtk::input_add() for a popen() filehandle? | ||
| Groups: | php.gtk.general | ||
| Request: | Send a blank email to php-gtk-general+get-1685@lists.php.net to get a copy of this message | ||
G'day,
I'm trying to write an application using PHP-GTK that will run rsync
over ssh in a pipe, so that I can update the GUI according to the
progress (or failure) of the rsync.
If I were using C, then I would use popen(), obtain the file descriptor
for the pipe, and then hand it to gtk_input_add_full() so that I can
return control to the GTK+ event loop, and be informed when input
arrives. I've done this successfully in C before.
However, the PHP-GTK function Gtk::input_add() only accepts an fopen()
filehandle. The check is in ext/gtk+/gtk.overrides:288 (rev 1.48) and
changing it to allow popen() filehandles doesn't seem to work. The
callback is not called. I presume the filehandle types are different.
Can anyone suggest how to fix this?
--
James Cameron mailto:quozl@us.netrek.org http://quozl.netrek.org/