]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
fds max test before start.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Thu, 17 Jul 2008 10:07:40 +0000 (10:07 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Thu, 17 Jul 2008 10:07:40 +0000 (10:07 +0000)
git-svn-id: file:///svn/unbound/trunk@1156 be551aaa-1e26-0410-a405-d3ace91eadb9

daemon/unbound.c
doc/Changelog

index 2c2fcb5c151c349d1ffe59192ed82e445399f72c..f1732eaefac5e728bd90ee1db876a10c3525fa07 100644 (file)
@@ -141,6 +141,21 @@ checkrlimits(struct config_file* cfg)
                log_warn("increased limit(open files) from %u to %u",
                        (unsigned)avail, (unsigned)total+10);
        }
+       if(total > 1024 && 
+               strncmp(event_get_version(), "mini-event", 10) == 0) {
+               log_err("too many file descriptors requested. The builtin"
+                       "mini-event cannot handle more than 1024. Config "
+                       "for less fds or compile with libevent");
+               fatal_exit("configuration needs too many file descriptors");
+       }
+       if(perthread > 64 && 
+               strncmp(event_get_version(), "winsock-event", 13) == 0) {
+               log_err("too many file descriptors requested. The winsock"
+                       " event handler cannot handle more than 64 per "
+                       " thread. Config for less fds or compile with "
+                       " libevent");
+               fatal_exit("configuration needs too many file descriptors");
+       }
 #else  
        (void)cfg;
 #endif /* HAVE_GETRLIMIT */
index 7e8f15548430ca58ed63847f512fe4d43ace8307..e5ea1a544b56ff8ed7e952317f9251a5d02533fd 100644 (file)
@@ -1,6 +1,8 @@
 17 July 2008: Wouter
        - fix bug #196, compile outside source tree.
        - fix bug #195, add --with-username=user configure option.
+       - print error and exit if started with config that requires more
+         fds than the builtin minievent can handle.
 
 16 July 2008: Wouter
        - made svn tag 1.0.1, trunk now 1.0.2