Re: gtk_input_add_full() and marshalling



>On Wed, 10 Apr 2002, Paul Davis wrote:
>> no, not unless reaching the end somehow makes the file descriptor
>> invalid. i can't think of anything that would do that.
>
>Well, my input handler gets called continuously even after the input
>from the file is exhausted. I checked some code in cvs.gnome.org for
>different apps and it seems they call gtk_input_remove() once read()
>returns 0. Is that correct?

glib uses poll(2) to detect the state of the file referred to by the
descriptor. it also detects POLLHUP as far as i recall. so what
happens at EOF depends a lot on how the underlying file behaves
(e.g. if its a device, what does it return to poll(2) at EOF). what
conditions are you explicitly asking for?

--p




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