On 1/2/07, FVWM CVS <fvwm-workers@fvwm.org> wrote:
CVSROOT: /home/cvs/fvwm
Module name: fvwm
Changes by: renato 07/01/01 19:45:51
Modified files:
. : ChangeLog
fvwm : events.c module_interface.c module_interface.h
Log message:
* Created function module_add_to_fdsets from events.c and module_interface.c
fdset adding code, using it instead.
* Added to it a check to avoid fd_set overflows.
In the tests I'm calling the function GetFdWidth() twice for every
module, which may incur in a bit overhead..
There's a global var called fd_width. I don't know if I should use the
it instead, but supose it should be removed.. I've also considered the
use of a static global var to improve performance.
On the other hand, in this case we don't care for the number of
maximum opened fds - if the number is too big then the open pipe call
will fail. What we want is the max fdset size, so maybe we can just
use FD_SETSIZE.
So what's the best solution?
About the fd_width global, it is used for the select calls. I don't
know if it's better performance-wise to ask for the whole range of
possible pipes (like now) or keep the record of the bigger pipe fd..
Cheers
Renato