Fix typos and kqueue() engine.
authorMichael Poole <mdpoole@troilus.org>
Sun, 23 Jan 2005 16:03:15 +0000 (16:03 +0000)
committerMichael Poole <mdpoole@troilus.org>
Sun, 23 Jan 2005 16:03:15 +0000 (16:03 +0000)
git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/trunk@1303 c9e4aea6-c8fd-4c43-8297-357d70d61c8c

ChangeLog
doc/example.conf
include/client.h
ircd/ircd.c

index 055ef10d020c95d14dcf2c44afb7af41455aaea6..919be06c384dc7621e39456b91870ec43039cb50 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2005-01-23  Michael Poole <mdpoole@troilus.org>
+
+       * doc/example.conf (Kill): Fix typo in realname Kill block
+
+       * include/client.h (infousermodes): Fix typo in comment.
+
+       * ircd/ircd.c (parse_command_line): -k implies BOOT_TTY.
+       (main): Move daemon_init() before event_init() to work around BSD
+       lameness.
+
 2005-01-23  Michael Poole <mdpoole@troilus.org>
 
        * ircd/test/Makefile.in: Add missing "install" target.  Make
index e548d69894c14096a4dc73cc900c63146035935e..ee44712c8d1d1913751517f65bf0de8863611352 100644 (file)
@@ -500,7 +500,7 @@ Kill
 # The realname field lets you ban by realname...
 Kill
 {
host = "*sub7*";
realname = "*sub7*";
  reason = "You are infected with a Trojan";
 };
 
index 42881b140efc14d36bc42446e5ad42cbcbac22b7..367a0f226f4c490d18c4f8dc7c4e1ab9769c2985 100644 (file)
@@ -89,7 +89,7 @@ typedef unsigned long flagpage_t;
 /** Clear a flag in a flagset. */
 #define FlagClr(set,flag) ((set)->bits[FLAGSET_INDEX(flag)] &= ~FLAGSET_MASK(flag))
 
-/** String containig valid user modes, in no particular order. */
+/** String containing valid user modes, in no particular order. */
 #define infousermodes "dioswkgx"
 
 /** Operator privileges. */
index 363903ebdde8a37f30a4b5e9f8f18d85324795db..db6c6040f38aabf9d9a7a3d4fc95d14e170f14a5 100644 (file)
@@ -464,7 +464,7 @@ static void parse_command_line(int argc, char** argv) {
    */
   while ((opt = getopt(argc, argv, options)) != EOF)
     switch (opt) {
-    case 'k':  thisServer.bootopt |= BOOT_CHKCONF;     break;
+    case 'k':  thisServer.bootopt |= BOOT_CHKCONF | BOOT_TTY; break;
     case 'n':
     case 't':  thisServer.bootopt |= BOOT_TTY;         break;
     case 'd':  dpath      = optarg;                    break;
@@ -639,6 +639,11 @@ int main(int argc, char **argv) {
 
   close_connections(!(thisServer.bootopt & (BOOT_DEBUG | BOOT_TTY | BOOT_CHKCONF)));
 
+  /* daemon_init() must be before event_init() because kqueue() FDs
+   * are, perversely, not inherited across fork().
+   */
+  daemon_init(thisServer.bootopt & BOOT_TTY);
+
   event_init(MAXCONNECTIONS);
 
   setup_signals();
@@ -677,7 +682,6 @@ int main(int argc, char **argv) {
   }
 
   debug_init(thisServer.bootopt & BOOT_TTY);
-  daemon_init(thisServer.bootopt & BOOT_TTY);
   if (check_pid()) {
     Debug((DEBUG_FATAL, "Failed to acquire PID file lock after fork"));
     exit(2);