Actions
Bug #2723
closedsetrlimit can increase RLIMIT_NOFILE up to rlim_max for non-root
ASK QUESTIONS IN Forums:
Description
setrlimit can increase RLIMIT_NOFILE up to rlim_max for non-root
diff --git a/src/server.c b/src/server.c index 61d850c..7aacf2e 100644 --- a/src/server.c +++ b/src/server.c @@ -954,9 +954,9 @@ int main (int argc, char **argv) { } /** - * we are not root can can't increase the fd-limit, but we can reduce it + * we are not root can can't increase the fd-limit above rlim_max, but we can reduce it */ - if (srv->srvconf.max_fds && srv->srvconf.max_fds < rlim.rlim_cur) { + if (srv->srvconf.max_fds && srv->srvconf.max_fds <= rlim.rlim_max) { /* set rlimits */ rlim.rlim_cur = srv->srvconf.max_fds;
Updated by gstrauss over 8 years ago
- Status changed from Patch Pending to Fixed
committed in bb953177
Actions
Also available in: Atom