diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2001-01-18 09:30:37 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2001-01-18 09:30:37 +0000 |
commit | c807d3552af3050bb8902508f034bf44a3ea53e8 (patch) | |
tree | 5aeb4aeefb8c4d5433b81bfd14e3ffe4d3267934 /winsup/cygwin/resource.cc | |
parent | 4e2a97b2ac38973cf392104ffab62871d06fb4ba (diff) | |
download | newlib-c807d3552af3050bb8902508f034bf44a3ea53e8.zip newlib-c807d3552af3050bb8902508f034bf44a3ea53e8.tar.gz newlib-c807d3552af3050bb8902508f034bf44a3ea53e8.tar.bz2 |
* resource.cc (setrlimit): Support RLIMIT_NOFILE.
Diffstat (limited to 'winsup/cygwin/resource.cc')
-rw-r--r-- | winsup/cygwin/resource.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/winsup/cygwin/resource.cc b/winsup/cygwin/resource.cc index cb1fc22..fbd335a 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; |