OpenSDE Packages Database (without history before r20070)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

52 lines
1.9 KiB

  1. # --- T2-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # T2 SDE: package/.../gatling/setrlimit_nofile.patch
  5. # Copyright (C) 2006 The T2 SDE Project
  6. #
  7. # More information can be found in the files COPYING and README.
  8. #
  9. # This patch file is dual-licensed. It is available under the license the
  10. # patched project is licensed under, as long as it is an OpenSource license
  11. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  12. # of the GNU General Public License as published by the Free Software
  13. # Foundation; either version 2 of the License, or (at your option) any later
  14. # version.
  15. # --- T2-COPYRIGHT-NOTE-END ---
  16. raised the base RLIMIT_NOFILE from 0 to a safe 500
  17. (useful if the root account has restricted capabilities)
  18. --- ./gatling.c.orig 2006-05-13 08:34:44.000000000 +0000
  19. +++ ./gatling.c 2006-05-13 08:47:12.000000000 +0000
  20. @@ -4142,7 +4142,7 @@
  21. rl.rlim_cur=RLIM_INFINITY; rl.rlim_max=RLIM_INFINITY;
  22. setrlimit(RLIMIT_NPROC,&rl);
  23. #endif
  24. - for (l=0; l<20000; l+=500) {
  25. + for (l=500; l<20000; l+=500) {
  26. rl.rlim_cur=l; rl.rlim_max=l;
  27. if (setrlimit(RLIMIT_NOFILE,&rl)==-1) break;
  28. }
  29. --- ./httpbench.c.orig 2006-05-13 08:34:44.000000000 +0000
  30. +++ ./httpbench.c 2006-05-13 08:47:21.000000000 +0000
  31. @@ -176,7 +176,7 @@
  32. rl.rlim_cur=RLIM_INFINITY; rl.rlim_max=RLIM_INFINITY;
  33. setrlimit(RLIMIT_NPROC,&rl);
  34. #endif
  35. - for (l=0; l<20000; l+=500) {
  36. + for (l=500; l<20000; l+=500) {
  37. rl.rlim_cur=l; rl.rlim_max=l;
  38. if (setrlimit(RLIMIT_NOFILE,&rl)==-1) break;
  39. }
  40. --- ./ioerr.c.orig 2006-05-13 08:34:44.000000000 +0000
  41. +++ ./ioerr.c 2006-05-13 08:47:32.000000000 +0000
  42. @@ -94,7 +94,7 @@
  43. rl.rlim_cur=RLIM_INFINITY; rl.rlim_max=RLIM_INFINITY;
  44. setrlimit(RLIMIT_NPROC,&rl);
  45. #endif
  46. - for (l=0; l<20000; l+=500) {
  47. + for (l=500; l<20000; l+=500) {
  48. rl.rlim_cur=l; rl.rlim_max=l;
  49. if (setrlimit(RLIMIT_NOFILE,&rl)==-1) break;
  50. }