# --- T2-COPYRIGHT-NOTE-BEGIN --- # This copyright note is auto-generated by ./scripts/Create-CopyPatch. # # T2 SDE: package/.../gatling/setrlimit_nofile.patch # Copyright (C) 2006 The T2 SDE Project # # More information can be found in the files COPYING and README. # # This patch file is dual-licensed. It is available under the license the # patched project is licensed under, as long as it is an OpenSource license # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms # of the GNU General Public License as published by the Free Software # Foundation; either version 2 of the License, or (at your option) any later # version. # --- T2-COPYRIGHT-NOTE-END --- raised the base RLIMIT_NOFILE from 0 to a safe 500 (useful if the root account has restricted capabilities) --- ./gatling.c.orig 2006-05-13 08:34:44.000000000 +0000 +++ ./gatling.c 2006-05-13 08:47:12.000000000 +0000 @@ -4142,7 +4142,7 @@ rl.rlim_cur=RLIM_INFINITY; rl.rlim_max=RLIM_INFINITY; setrlimit(RLIMIT_NPROC,&rl); #endif - for (l=0; l<20000; l+=500) { + for (l=500; l<20000; l+=500) { rl.rlim_cur=l; rl.rlim_max=l; if (setrlimit(RLIMIT_NOFILE,&rl)==-1) break; } --- ./httpbench.c.orig 2006-05-13 08:34:44.000000000 +0000 +++ ./httpbench.c 2006-05-13 08:47:21.000000000 +0000 @@ -176,7 +176,7 @@ rl.rlim_cur=RLIM_INFINITY; rl.rlim_max=RLIM_INFINITY; setrlimit(RLIMIT_NPROC,&rl); #endif - for (l=0; l<20000; l+=500) { + for (l=500; l<20000; l+=500) { rl.rlim_cur=l; rl.rlim_max=l; if (setrlimit(RLIMIT_NOFILE,&rl)==-1) break; } --- ./ioerr.c.orig 2006-05-13 08:34:44.000000000 +0000 +++ ./ioerr.c 2006-05-13 08:47:32.000000000 +0000 @@ -94,7 +94,7 @@ rl.rlim_cur=RLIM_INFINITY; rl.rlim_max=RLIM_INFINITY; setrlimit(RLIMIT_NPROC,&rl); #endif - for (l=0; l<20000; l+=500) { + for (l=500; l<20000; l+=500) { rl.rlim_cur=l; rl.rlim_max=l; if (setrlimit(RLIMIT_NOFILE,&rl)==-1) break; }