Linux poll issue
- From: David Helder <dhelder umich edu>
- To: gtk-devel-list gnome org
- Subject: Linux poll issue
- Date: Fri, 12 May 2000 12:44:52 -0400 (EDT)
[I originally send this @redhat.com and it didn't complain. hmm...]
Linux 2.2.14 and earlier versions doesn't like it when you poll more file
descriptors than you have [1]. Unfortunately, glib does this, if the
programmer calls add_watch multiple times for the same channel (ie, file
descriptor). (I'm not sure if glib does it internally too.)
Solutions:
- Fix Linux. This may have been fixed in Janauary. I can't tell from
mailing list.
- Patch g_main_poll to create only one GPollFD per FD. This may require
extra bookkeeping and/or loops.
- Detect in glib's configure and undefine HAVE_POLL to use g_poll.
Workarounds:
- Detect in your programs configure and define poll, which will override
glibc's poll. This is hacky, but probably what I'll end up doing.
- Call add_watch only once for each iochannel. I think I can do this, but
I'd rather not.
David
[1] http://www.uwsg.iu.edu/hypermail/linux/kernel/0001.1/0181.html
--
__ _ __
___/ /__ __ __(_)__/ / David Helder - University of Michigan
/ _ / _ `/ |/ / / _ / dhelder@umich.edu
|_,_/|_,_/|___/_/|_,_/ http://www.eecs.umich.edu/~dhelder
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]