On 09/24/2013 10:32 PM, Christopher Faylor wrote: >> This patch causes failures on at least test-fcntl and test-dup2 on >> cygwin (both 32-bit and 64-bit); there, getdtablesize() currently >> returns the current runtime value, but this value starts at 256, and >> automatically expands as needed at runtime up to 3200. I think cygwin >> should be patched to make getdtablesize() return a constant 3200 (rather >> than the current runtime value); > > Why? What does "3200" have to do with anything? There is not supposed > to be a hard-coded upper limit. > But there IS a hard-coded limit: http://cygwin.com/cgi-bin/cvsweb.cgi/src/winsup/cygwin/dtable.h?rev=1.59&content-type=text/x-cvsweb-markup&cvsroot=src /* Initial and increment values for cygwin's fd table */ #define NOFILE_INCR 32 /* Maximum size we allow expanding to. */ #define OPEN_MAX_MAX (100 * NOFILE_INCR) My point is that on all other systems, even if the dtable itself dynamically grows, getdtablesize() returns the maximum it can grow to, not its current size. Cygwin's behavior is the odd man out, and is causing grief in the gnulib test suite. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org