How to close a GIOChannel?
- From: Tomek Grzejszczyk <tgrzejsz elka pw edu pl>
- To: gtk-app-devel-list gnome org
- Subject: How to close a GIOChannel?
- Date: Sun, 10 Oct 2004 14:32:35 +0200
Hi,
I've a device which I open with g_io_channel_new_file and then I add it
to the main loop with g_io_add_watch. Then I have a callback function
connected to GUI in which I call:
g_io_channel_shutdown()
and when I leave this callback I receive another from... io channel I've
just shuted down. The only way I can tell that I shouldn't read from
device any more is... G_IO_FLAG_IS_SEEKABLE flag is now off (but
G_IO_FLAG_IS_READABLE is still on, but on the other hand reading from
the channel causes segmentation fault). Condition the callback gets
called for is... G_IO_IN (not any of G_IO_ERR, G_IO_HUP, G_IO_NVAL as I
might have expected).
Is this the way this is supposed to work?
Shouldn't a call to g_io_channel_shutdown prevent any further callbacks
from a channel?
Greetings,
Tomek
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]