cvs commit: src/lib/libc/resolv res_send.c

John Baldwin jhb at FreeBSD.org
Mon Mar 5 19:39:51 UTC 2007


jhb         2007-03-05 19:39:51 UTC

  FreeBSD src repository

  Modified files:
    lib/libc/resolv      res_send.c 
  Log:
  Only reject file descriptors higher than FD_SETSIZE if we are not using
  poll(2) or kqueue(2).  Previously we rejected fd's higher than FD_SETSIZE
  for kevent(2), and larger than sysconf(_SC_OPEN_MAX) for poll(2).  However,
  the check for poll(2) wasn't really needed.  open(2) and socket(2) won't
  return an fd you can't pass to either poll(2) or kevent(2).  This fixes
  a but where gethostbyname() would fail if you had more than 1023 files
  open in a process.
  
  MFC after:      1 week
  Reviewed by:    ume
  Found by:       ps
  
  Revision  Changes    Path
  1.7       +5 -7      src/lib/libc/resolv/res_send.c


More information about the cvs-src mailing list