diff options
author | Christopher Faylor <me@cgf.cx> | 2003-07-09 01:33:06 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2003-07-09 01:33:06 +0000 |
commit | 4d782b426a09120642906e12e21bf669b7bb77db (patch) | |
tree | 514a0f6f1034d3bf897b6f7d7c365779fa40c44b /winsup/cygwin/resource.cc | |
parent | a42408549f7b286dda7f333b5b977caf67fc1cdd (diff) | |
download | cygnal-4d782b426a09120642906e12e21bf669b7bb77db.tar.gz cygnal-4d782b426a09120642906e12e21bf669b7bb77db.tar.bz2 cygnal-4d782b426a09120642906e12e21bf669b7bb77db.zip |
* cygheap.cc (creturn): Set appropriate errno when out of memory.
(ccalloc): Only issue system_printf when debugging.
* dtable.cc (dtable::extend): Only allocate 100 * the incremental growth size
max. Set errno appropriately.
(dtable::build_fhandler): Check for error from set_name.
* fhandler.cc (fhandler_base::set_name): Set errno and return error on OOM.
* fhandler.h (fhandler_base::set_name): Change to bool.
* fhandler_process.cc (format_process_stat): Fix formatting.
* resource.cc (getrlimit): Return greater of OPEN_MAX or fd table size.
* sysconf.cc (sysconf): Ditto.
Diffstat (limited to 'winsup/cygwin/resource.cc')
-rw-r--r-- | winsup/cygwin/resource.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/winsup/cygwin/resource.cc b/winsup/cygwin/resource.cc index e87702bab..536dfe8a5 100644 --- a/winsup/cygwin/resource.cc +++ b/winsup/cygwin/resource.cc @@ -137,6 +137,8 @@ getrlimit (int resource, struct rlimit *rlp) break; case RLIMIT_NOFILE: rlp->rlim_cur = getdtablesize (); + if (rlp->rlim_cur < OPEN_MAX) + rlp->rlim_cur = OPEN_MAX; break; case RLIMIT_CORE: rlp->rlim_cur = rlim_core; |