* resource.cc (setrlimit): Support RLIMIT_NOFILE.
This commit is contained in:
parent
4e2a97b2ac
commit
c807d3552a
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue