diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2001-01-18 12:30:37 +0300 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2001-01-18 12:30:37 +0300 |
commit | c807d3552af3050bb8902508f034bf44a3ea53e8 (patch) | |
tree | 5aeb4aeefb8c4d5433b81bfd14e3ffe4d3267934 /winsup | |
parent | 4e2a97b2ac38973cf392104ffab62871d06fb4ba (diff) |
* resource.cc (setrlimit): Support RLIMIT_NOFILE.
Diffstat (limited to 'winsup')
-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; |