mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-04-26 12:58:03 +00:00
* automatically deduce ulimit-n from maxsock
This commit is contained in:
parent
203b0b624f
commit
dd676173f0
@ -8206,6 +8206,9 @@ int main(int argc, char **argv) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* ulimits */
|
/* ulimits */
|
||||||
|
if (!global.rlimit_nofile)
|
||||||
|
global.rlimit_nofile = global.maxsock;
|
||||||
|
|
||||||
if (global.rlimit_nofile) {
|
if (global.rlimit_nofile) {
|
||||||
limit.rlim_cur = limit.rlim_max = global.rlimit_nofile;
|
limit.rlim_cur = limit.rlim_max = global.rlimit_nofile;
|
||||||
if (setrlimit(RLIMIT_NOFILE, &limit) == -1) {
|
if (setrlimit(RLIMIT_NOFILE, &limit) == -1) {
|
||||||
|
Loading…
Reference in New Issue
Block a user