* 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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user