Re: Gtk::input_add() for a popen() filehandle?
| From: | Andrei Zmievski | Date: | Mon, 01 Apr 2002 16:57:18 +0000 |
| Subject: | Re: Gtk::input_add() for a popen() filehandle? | ||
| Groups: | php.gtk.general | ||
| Request: | Send a blank email to php-gtk-general+get-1692@lists.php.net to get a copy of this message | ||
Alan Knowles wrote:
> Ahh, after a little investigation :)
>
>
> http://mail.gnome.org/archives/gtk-list/1998-July/msg00680.html
>
> notice the magic fileno(stream) -
>
> I suspect if you change
>
> RETURN_LONG(gtk_input_add_full(*source, condition, NULL,
> (GtkCallbackMarshal)php_gtk_input_marshal,
> data, php_gtk_destroy_notify));
> }
>
> to
>
> RETURN_LONG(gtk_input_add_full(fileno(*source), condition, NULL,
> (GtkCallbackMarshal)php_gtk_input_marshal,
> data, php_gtk_destroy_notify));
> }
>
> It may work with popen, - now if that works.... did you want to work out
> a patch that works for both file and popen :)
I don't think that's the problem. If he is using CVS version of PHP, it
has a new streams-based implementation for file/pipe/socket access.
Looks like we'll need to adjust the code in order to live with it,
probably based on the API_NO or something similar.
-Andrei
"Computers are useless. They can only give you answers."
--Pablo Picasso