From 3c2123a15ed3dea068e34bdedd9b07aa43d4c927 Mon Sep 17 00:00:00 2001 From: Michael Poole Date: Sun, 23 Jan 2005 16:03:15 +0000 Subject: [PATCH] Fix typos and kqueue() engine. git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/trunk@1303 c9e4aea6-c8fd-4c43-8297-357d70d61c8c --- ChangeLog | 10 ++++++++++ doc/example.conf | 2 +- include/client.h | 2 +- ircd/ircd.c | 8 ++++++-- 4 files changed, 18 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 055ef10..919be06 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2005-01-23 Michael Poole + + * 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 * ircd/test/Makefile.in: Add missing "install" target. Make diff --git a/doc/example.conf b/doc/example.conf index e548d69..ee44712 100644 --- a/doc/example.conf +++ b/doc/example.conf @@ -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"; }; diff --git a/include/client.h b/include/client.h index 42881b1..367a0f2 100644 --- a/include/client.h +++ b/include/client.h @@ -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. */ diff --git a/ircd/ircd.c b/ircd/ircd.c index 363903e..db6c604 100644 --- a/ircd/ircd.c +++ b/ircd/ircd.c @@ -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); -- 2.20.1