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

on RLIMIT_NOFILE.
        * syscalls.cc (getdtablesize): Return OPEN_MAX if current dtable size
        is less than OPEN_MAX, the current dtable size otherwise.
        * sysconf.cc (sysconf): Return getdtablesize () on _SC_OPEN_MAX.
This commit is contained in:
Corinna Vinschen
2001-08-16 14:29:21 +00:00
parent 3171175e90
commit 1457739a63
4 changed files with 11 additions and 3 deletions

View File

@@ -120,7 +120,7 @@ getrlimit (int resource, struct rlimit *rlp)
case RLIMIT_STACK:
break;
case RLIMIT_NOFILE:
rlp->rlim_cur = OPEN_MAX;
rlp->rlim_cur = getdtablesize ();
break;
case RLIMIT_CORE:
rlp->rlim_cur = rlim_core;