diff options
-rw-r--r-- | winsup/cygwin/ChangeLog | 4 | ||||
-rw-r--r-- | winsup/cygwin/resource.cc | 5 |
2 files changed, 9 insertions, 0 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index a6313e4b6..ddba7e50b 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,7 @@ +Thu Jan 18 10:27:00 2001 Corinna Vinschen <corinna@vinschen.de> + + * resource.cc (setrlimit): Support RLIMIT_NOFILE. + Wed Jan 17 23:23:12 2001 Christopher Faylor <cgf@cygnus.com> * syscalls.cc (setdtablesize): Call with amount to increment not total diff --git a/winsup/cygwin/resource.cc b/winsup/cygwin/resource.cc index cb1fc222a..fbd335ae6 100644 --- a/winsup/cygwin/resource.cc +++ b/winsup/cygwin/resource.cc @@ -14,6 +14,7 @@ details. */ #include "winsup.h" #include <errno.h> +#include <unistd.h> #include "cygerrno.h" #include "sync.h" #include "sigproc.h" @@ -165,6 +166,10 @@ setrlimit (int resource, const struct rlimit *rlp) case RLIMIT_CORE: rlim_core = rlp->rlim_cur; break; + case RLIMIT_NOFILE: + if (rlp->rlim_cur != RLIM_INFINITY) + return setdtablesize (rlp->rlim_cur); + break; default: set_errno (EINVAL); return -1; |