Skip to content
Snippets Groups Projects
  • Per Hedbor's avatar
    e16e5178
    Removed MAX_FD configure test · e16e5178
    Per Hedbor authored
    It only returns the current max anyway, which is usually
    smaller than the max if you are running as root, and can
    also be changed at any time at runtime.
    
    Instead, use sysconf(_SC_OPEN_MAX) when available if needed, and as a
    last resort a hardcoded value (on Windows), but as a secondary change
    all uses except two was removed:
    
    o Stdio.get_all_active_fd - On systems without /dev/fd and
      /proc/self/fd.
    
    o On NT, the size of FD_SET is now set to a hardcoded value (64k).
    
    The rewrite of get_all_active_fd also speeds it up a lot. Not that it
    is a frequently used function.
    e16e5178
    History
    Removed MAX_FD configure test
    Per Hedbor authored
    It only returns the current max anyway, which is usually
    smaller than the max if you are running as root, and can
    also be changed at any time at runtime.
    
    Instead, use sysconf(_SC_OPEN_MAX) when available if needed, and as a
    last resort a hardcoded value (on Windows), but as a secondary change
    all uses except two was removed:
    
    o Stdio.get_all_active_fd - On systems without /dev/fd and
      /proc/self/fd.
    
    o On NT, the size of FD_SET is now set to a hardcoded value (64k).
    
    The rewrite of get_all_active_fd also speeds it up a lot. Not that it
    is a frequently used function.