GNOME Bugzilla – Bug 604568
Multiple g_io_add_watch_full() on win32, last one wins, others silent.
Last modified: 2009-12-15 15:41:19 UTC
I want to create (3) multiple watches for G_IO_IN, G_IO_OUT, G_IO_others,
so that I can unsubscribe IN and OUT independently. (PRI|ERR|HUP|NVAL).
It appears, that only the last watch created is handled properly.
If G_IO_OUT is the last watch created, it is called when connect()
happens. Otherwise it is never called. In that case G_IO_IN's
watch is never called.
I have a single source file that works fine on UNIX,
but fails on WIN32, and also varies with the order of watches.
g_io_channel_win32_set_debug shows a loop without anything matching.
It comes with a makefile that needs IMCROSS and PKG_CONFIG_PATH.
It gives similar results on XP-SP2 and on WINE.
Just run W on win32, M on Linux. Fingers crossed ;-)
Created attachment 149754 [details]
C++ test program makefile uses IMCROSS and PKG_CONFIG_PATH
Does a web get to port 80 127.0.0.1
gtk_main never exits (press ctrl-C), but does reach end of task.
just a single source file attached would be fine, no need for a tarball with makefiles and stuff, especially if the makefile contain odd paths and run the resulting executable under wine anyway. anybody intending to debug and fix this is fully capable of compiling a simple single source file test program. But thanks anyway, it is always good to get explicit test programs.
Anyway, this presumably is a duplicate of bug #338943.
I dont really understand either, to know that they are, or are not, the same,
but I am happy for you to fold this under that one. Suggestions on how to proceed?
Possibly the "very early test patch" in bug #338943 could be worked on and actually taken into use? Or, at least the code should check if multiple watches are used for the same channel on Windows, and warn in that case.
Anyway, resolving as duplicate now.
*** This bug has been marked as a duplicate of bug 338943 ***