Re: issue with gnome-dictionary and io channels



On Thu, 16 Dec 2004 14:09:55 -0600, Aaron Solochek
<aarons-gnome aberrant org> wrote:
> Tristan Van Berkom wrote:
> > On Thu, 16 Dec 2004 11:01:32 -0600, Aaron Solochek
> > <aarons-gnome aberrant org> wrote:
> > [...]
[...]
> The handler that's getting fired is for G_IO_IN.  Why would that be
> continuously triggered when the condition is actually G_IO_HUP?  I tried
> checking for G_IO_HUP inside the handler (I added it to the condition to
> trigger on) with g_io_channel_get_buffer_condition and just by manually
> printing the condition variable passed in.
> g_io_channel_get_buffer_condition always returns 0, and the passed in
> condition always is 1 (G_IO_IN).
> 
> Is this network situation I'm experiencing really all that unusual that
> it goes basically undetected by the standard libs?  Why wouldn't SIGPIPE
> be sent here?

Ok, maybe I'm going about things completely backwards; but for me it 
works 100% so I must be doing something right ;-)

My questionable routine for detecting hangups:
    - Hookup a handler to a G_IO_IN condition
    - If read returns 0 bytes I assume this was a hangup.

I'm not speaking for or against G_IO_HUP condition, I dont know how or
if it works, afaik reading 0 bytes on a ready file descriptor is how to detect
a hangup.

This may or may not make sence :-/

HTH,
                                          -Tristan



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