Mercurial > gnulib
view doc/glibc-functions/getdtablesize.texi @ 37188:ae8079a89eec
getdtablesize: work around cygwin issue
Cygwin 1.7.25 has a bug that even though it claims to support
RLIMIT_NOFILE inheritance, there is no enforcement of the soft
limit, and getdtablesize() automatically grows until it reaches
the hard limit which cannot be changed by setrlimit(). Best is
to just treat things as an invariant limit, as several other
modules assume that getdtablesize() will not change without an
intervening setrlimit().
* m4/getdtablesize.m4 (gl_FUNC_GETDTABLESIZE): Detect problem.
* modules/getdtablesize (configure.ac): Build replacement.
* m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Set up a witness.
* modules/unistd (Makefile.am): Expose the witness.
* lib/unistd.in.h (getdtablesize): Declare replacement.
* lib/getdtablesize.c (rpl_getdtablesize): Work around it.
* tests/test-getdtablesize.c (main): Test it.
* doc/glibc-functions/getdtablesize.texi (getdtablesize): Document it.
Signed-off-by: Eric Blake <eblake@redhat.com>
author | Eric Blake <eblake@redhat.com> |
---|---|
date | Thu, 26 Sep 2013 11:26:29 -0600 |
parents | abbb8d904c4b |
children | c513a8c0f555 |
line wrap: on
line source
@node getdtablesize @subsection @code{getdtablesize} @findex getdtablesize Gnulib module: getdtablesize Portability problems fixed by Gnulib: @itemize @item This function is missing on some platforms: mingw, MSVC 9. @item This function does not represent the true @code{RLIMIT_NOFILE} soft limit on some platforms: Cygwin 1.7.25. @end itemize Portability problems not fixed by Gnulib: @itemize @end itemize