INN commit: branches/2.5/innd (innd.c)

INN Commit rra at isc.org
Wed Aug 31 21:22:20 UTC 2011


    Date: Wednesday, August 31, 2011 @ 14:22:20
  Author: iulius
Revision: 9370

silent a log message about FD_SETSIZE

As rlimitnofile is set to "-1" by default, innd should handle
silently a decrease of available file descriptors to FD_SETSIZE
minus 1.

Modified:
  branches/2.5/innd/innd.c

--------+
 innd.c |    9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

Modified: innd.c
===================================================================
--- innd.c	2011-08-31 21:19:55 UTC (rev 9369)
+++ innd.c	2011-08-31 21:22:20 UTC (rev 9370)
@@ -612,8 +612,13 @@
 
 #ifdef FD_SETSIZE
     if (FD_SETSIZE > 0 && (unsigned) i >= FD_SETSIZE) {
-        syslog(LOG_WARNING, "%s number of descriptors (%d) exceeding or equaling FD_SETSIZE (%d)",
-               LogName, i, FD_SETSIZE);
+        /* Only log a warning if rlimitnofile has been set
+         * to a value different than the default setting of letting
+         * the system set the number of file descriptors. */
+        if (innconf->rlimitnofile > 0) {
+            syslog(LOG_WARNING, "%s number of descriptors (%d) exceeding or equaling FD_SETSIZE (%d)",
+                   LogName, i, FD_SETSIZE);
+        }
         i = FD_SETSIZE-1;
     }
 #endif




More information about the inn-committers mailing list