Re: issue with gnome-dictionary and io channels



On Thu, 16 Dec 2004 11:01:32 -0600, Aaron Solochek
<aarons-gnome aberrant org> wrote:
[...]
> In the above situation, the "have data on the socket to read" callback
> is fired, but g_io_channel_read_chars() reads 0 bytes, and returns
> without an error.  The flag triggering the callback is either not reset
> by the read, or is triggered again for some unknown-to-me reason,
> resulting in the callback firing and failing to read in an infinite loop.
> 
> Does anyone have any insight into the internals of this?  I've tried
> playing with the underlying unix file descriptor, opening it with
> O_ASYNC and watching for the SIGIO in main(), but I think its being
> disabled by glib.  I can manually send a SIGIO to the process, and that
> is detected fine.

Looks like a hangup, I'm not sure if people in general are using a
G_IO_HUP condition handler or not, but the way I usualy detect
a hangup is by reading 0 bytes when select tells me that there
is data to read on the socket.

Cheers,
                                               -Tristan



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