]> jfr.im git - irc/rqf/shadowircd.git/commitdiff
[svn] Make the code that raises fd rlimit to hard limit work.
authorjilles <redacted>
Tue, 3 Apr 2007 22:25:11 +0000 (15:25 -0700)
committerjilles <redacted>
Tue, 3 Apr 2007 22:25:11 +0000 (15:25 -0700)
ChangeLog
include/serno.h
src/ircd.c

index 841c738b7d501ef97c9748a24b04cf80de58cb47..8e7cd398304546ab91ae81194eb9f18e6ada9ac9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+nenolod     2007/04/03 11:45:22 UTC    (20070403-3378)
+  Log:
+  - note the I/O reworking
+  
+
+  Changes:     Modified:
+  +2 -0                trunk/NEWS (File Modified) 
+
+
 nenolod     2007/04/03 11:37:39 UTC    (20070403-3376)
   Log:
   - use mkdir -p
index 86f7b4c8efb24d4c99479196129e6e6f7a25db64..c2611e453d92737346e659f5ed3bbede0764583f 100644 (file)
@@ -1 +1 @@
-#define SERNO "20070403-3376"
+#define SERNO "20070403-3378"
index 4b3f170610bc72dda442cb1242f9672ed8013b31..dd1264f830c2da38b968e3d57e674830bf6e8d8b 100644 (file)
@@ -21,7 +21,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: ircd.c 3354 2007-04-03 09:21:31Z nenolod $
+ *  $Id: ircd.c 3380 2007-04-03 22:25:11Z jilles $
  */
 
 #include "stdinc.h"
@@ -139,19 +139,19 @@ ircd_die_cb(const char *str)
 static void
 init_sys(void)
 {
-#if defined(RLIMIT_FD_MAX) && defined(HAVE_SYS_RLIMIT_H)
+#if defined(RLIMIT_NOFILE) && defined(HAVE_SYS_RESOURCE_H)
        struct rlimit limit;
 
-       if(!getrlimit(RLIMIT_FD_MAX, &limit))
+       if(!getrlimit(RLIMIT_NOFILE, &limit))
        {
                limit.rlim_cur = limit.rlim_max;        /* make soft limit the max */
-               if(setrlimit(RLIMIT_FD_MAX, &limit) == -1)
+               if(setrlimit(RLIMIT_NOFILE, &limit) == -1)
                {
                        fprintf(stderr, "error setting max fd's to %ld\n", (long) limit.rlim_cur);
                        exit(EXIT_FAILURE);
                }
        }
-#endif /* RLIMIT_FD_MAX */
+#endif /* RLIMIT_NOFILE */
 }
 
 static int
@@ -552,8 +552,8 @@ main(int argc, char *argv[])
        }
 
        /* Init the event subsystem */
-       libcharybdis_init(ircd_log_cb, restart, ircd_die_cb);
        init_sys();
+       libcharybdis_init(ircd_log_cb, restart, ircd_die_cb);
 
        fdlist_init();
        if(!server_state_foreground)