* 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

@ -122,6 +122,13 @@ details. */
This limits how many children we can fork/spawn off. */
#define CHILD_MAX 63
/* # of open files per process. Actually it can be more since Cygwin
grows the dtable as necessary. We define a reasonable limit here
which is returned by getdtablesize(), sysconf(_SC_OPEN_MAX) and
getrlimit(RLIMIT_NOFILE). */
#undef OPEN_MAX
#define OPEN_MAX 256
/* POSIX values */
/* These should never vary from one system type to another */
/* They represent the minimum values that POSIX systems must support.