]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
* automatically deduce ulimit-n from maxsock
authorWilly TARREAU <willy@pcw.(none)>
Sun, 12 Mar 2006 17:01:33 +0000 (18:01 +0100)
committerWilly TARREAU <willy@pcw.(none)>
Sun, 12 Mar 2006 17:01:33 +0000 (18:01 +0100)
haproxy.c

index dd349e1da4083a8b2aab4832086df9a44b64e8a7..3bab3f916f06a449f5f331303bffc27501be5061 100644 (file)
--- a/haproxy.c
+++ b/haproxy.c
@@ -8206,6 +8206,9 @@ int main(int argc, char **argv) {
     }
 
     /* ulimits */
+    if (!global.rlimit_nofile)
+       global.rlimit_nofile = global.maxsock;
+
     if (global.rlimit_nofile) {
        limit.rlim_cur = limit.rlim_max = global.rlimit_nofile;
        if (setrlimit(RLIMIT_NOFILE, &limit) == -1) {