* resource.cc (getrlimit): Return OPEN_MAX as current limit

on RLIMIT_NOFILE.
        * syscalls.cc (getdtablesize): Return OPEN_MAX.
        * sysconf.cc (sysconf): Return OPEN_MAX on _SC_OPEN_MAX.
        * include/limits.h (OPEN_MAX): Define as 256.
This commit is contained in:
Corinna Vinschen
2001-08-16 14:20:09 +00:00
parent 91a1423a87
commit 3171175e90
5 changed files with 20 additions and 5 deletions

View File

@ -33,10 +33,7 @@ sysconf (int in)
/* FIXME: what's the right value? _POSIX_ARG_MAX is only 4K */
return 1048576;
case _SC_OPEN_MAX:
/* FIXME: this returns the current limit which can increase
if and when dtable::find_unused_handle is called. Perhaps
we should return NOFILE or OPEN_MAX instead? */
return cygheap->fdtab.size;
return OPEN_MAX;
case _SC_PAGESIZE:
return getpagesize ();
case _SC_CLK_TCK: