Ver Fonte

Remove fork-interval.

This is very rude towards admins, and has been seen to be a problem
on low memory systems.
Bryan Drewery há 11 anos atrás
pai
commit
9bf2b600f9
7 ficheiros alterados com 2 adições e 12 exclusões
  1. 1 0
      doc/UPDATES
  2. 0 2
      doc/help.txt
  3. 0 3
      src/bg.c
  4. 0 2
      src/bg.h
  5. 0 2
      src/main.c
  6. 0 2
      src/set.c
  7. 1 1
      src/set.h

+ 1 - 0
doc/UPDATES

@@ -15,6 +15,7 @@ maint
   * Bot responses are now clear and nice. Recompile with your own list if you want
     in doc/responses.txt
   * Remove channel limit when limitraise is disabled (#77)
+  * 'fork-interval' removed.
 
 1.4.3
   * Default 'set promisc' to ignore since it's usually a false positive

+ 0 - 2
doc/help.txt

@@ -1684,8 +1684,6 @@ See also: reload, backup
 [S]  $bmsg-ident$b           Defines the cmd for identing via msging the bot.
 [S]  $bmsg-release$b         Defines the cmd for releasing a nick.
  
-[N]  $bfork-interval$b       Number of seconds in between each fork() call made by the bot. 
-                         (Resets PID/CPU)
 [R]  $bflood-msg$b           Msgs:Secs until a host is ignored. (0:0 to disable) 
 [R]  $bflood-ctcp$b          Ctcps:Secs until a host is ignored. (0:0 to disable) 
 [R]  $bflood-callerid$b      Msgs:Secs until triggering to set CALLERID for

+ 0 - 3
src/bg.c

@@ -43,8 +43,6 @@
 #include <unistd.h>
 #include <sys/stat.h>
 
-time_t lastfork = 0;
-
 int close_tty()
 {
   int fd = -1;
@@ -87,7 +85,6 @@ do_fork()
   pid_t pid = getpid();
 
   writepid(conf.bot->pid_file, pid);
-  lastfork = now;
   return pid;
 }
 

+ 0 - 2
src/bg.h

@@ -7,8 +7,6 @@
 
 #include <sys/types.h>
 
-extern time_t 		lastfork;
-
 pid_t do_fork();
 int close_tty();
 void writepid(const char *, pid_t);

+ 0 - 2
src/main.c

@@ -531,8 +531,6 @@ static void core_secondly()
   static int cnt = 0;
   time_t miltime;
 
-  if (fork_interval && backgrd && ((now - lastfork) > fork_interval))
-      do_fork();
   ++cnt;
 
   if (((conf.bot->localhub || conf.bot->hub) && (cnt % 30) == 0) || (cnt % 5) == 0) {

+ 0 - 2
src/set.c

@@ -48,7 +48,6 @@ int cloak_script = 0;
 rate_t close_threshold;
 int fight_threshold;
 int set_noshare = 0;
-int fork_interval;
 int hijack;
 int in_bots;
 int ison_time = 10;
@@ -99,7 +98,6 @@ static variable_t vars[] = {
  VAR("flood-callerid",	&flood_callerid,	VAR_RATE|VAR_NOLHUB,				0, 0, "6:2"),
  VAR("flood-ctcp",	&flood_ctcp,		VAR_RATE|VAR_NOLHUB,				0, 0, "3:60"),
  VAR("flood-msg",	&flood_msg,		VAR_RATE|VAR_NOLHUB,				0, 0, "5:60"),
- VAR("fork-interval",	&fork_interval,		VAR_INT,					10, 0, "0"),
  VAR("groups",		groups,			VAR_STRING|VAR_LIST|VAR_NOLHUB,			0, 0, "main"),
  VAR("hijack",		&hijack,		VAR_INT|VAR_DETECTED|VAR_PERM,			0, 4, "die"),
  VAR("homechan",	homechan,		VAR_WORD|VAR_NOLOC|VAR_HIDE,			0, 0, NULL),

+ 1 - 1
src/set.h

@@ -71,7 +71,7 @@ extern char		auth_key[], auth_prefix[2], motd[], alias[], rbl_servers[1024], gro
 			msgident[], msginvite[], msgop[], msgpass[], msgrelease[],
                         homechan[], altchars[];
 extern bool		dccauth, auth_obscure, manop_warn, auth_chan, oidentd, ident_botnick, irc_autoaway, link_cleartext, use_deaf, use_callerid, fish_auto_keyx, fish_paranoid;
-extern int		cloak_script, fight_threshold, fork_interval, in_bots, set_noshare, dcc_autoaway,
+extern int		cloak_script, fight_threshold, in_bots, set_noshare, dcc_autoaway,
 			kill_threshold, lag_threshold, op_bots, hijack, login, promisc, trace,
                         ison_time, msgrate, msgburst;
 extern rate_t		op_requests, close_threshold;