فهرست منبع

* Ported [2905] to 1.2.11
* Disabled watcher feature.


svn: 2906

Bryan Drewery 20 سال پیش
والد
کامیت
e7da6d2cd1
4فایلهای تغییر یافته به همراه13 افزوده شده و 1 حذف شده
  1. 1 0
      doc/UPDATES
  2. 6 0
      src/bg.c
  3. 2 1
      src/conf.c
  4. 4 0
      src/main.c

+ 1 - 0
doc/UPDATES

@@ -9,6 +9,7 @@ Lines prefixed with '-' were disabled before release and are not finished, or ar
 * Fixed removed bots not being automatically unlinked from botnet. (fixes #254)
 * Aliases may no longer reference other aliases (only checked when used) (fixes #244)
 * Fixed cmd_checkchannels so that results are not shown in log, but to user only. (fixes #217)
+* Disabled watcher feature.
 
 1.2.10 - http://tracker.shatow.net/milestone/1.2.10
 * Removed old references to '+/-manop' and '+/-nomop' for chaninfo in help file.

+ 6 - 0
src/bg.c

@@ -28,9 +28,11 @@
 time_t lastfork = 0;
 
 #if !defined(CYGWIN_HACKS) && !defined(__sun__)
+#ifdef NO
 pid_t watcher;                  /* my child/watcher */
 
 static void init_watcher(pid_t);
+#endif
 #endif /* !CYGWIN_HACKS */
 
 int close_tty()
@@ -82,8 +84,10 @@ do_fork()
   writepid(conf.bot->pid_file, pid);
   lastfork = now;
 #if !defined(CYGWIN_HACKS) && !defined(__sun__)
+#ifdef NO
   if (conf.watcher)
     init_watcher(pid);
+#endif
 #endif /* !CYGWIN_HACKS */
   return pid;
 }
@@ -112,6 +116,7 @@ writepid(const char *pidfile, pid_t pid)
 }
 
 #if !defined(CYGWIN_HACKS) && !defined(__sun__)
+#ifdef NO
 static void
 init_watcher(pid_t parent)
 {
@@ -152,4 +157,5 @@ init_watcher(pid_t parent)
     }
   }
 }
+#endif
 #endif /* !CYGWIN_HACKS */

+ 2 - 1
src/conf.c

@@ -951,11 +951,12 @@ writeconf(char *filename, FILE * stream, int bits)
   my_write(f, "! autouname %d\n", conf.autouname);
 
   comment("");
-
+#ifdef NO
   comment("# This will spawn a child process for EACH BOT that will block ALL process hijackers.");
   my_write(f, "! watcher %d\n", conf.watcher);
 
   comment("");
+#endif
 
   comment("# '|' means OR, [] means the enclosed is optional");
   comment("# A '+' in front of HOST means the HOST is ipv6");

+ 4 - 0
src/main.c

@@ -881,14 +881,18 @@ printf("out: %s\n", out);
 
   int socket_cleanup = 0, xx, i = 0, idx = 0;
 #if !defined(CYGWIN_HACKS) && !defined(__sun__)
+#ifdef NO
   int status = 0;
+#endif
 #endif /* !CYGWIN_HACKS */
   char buf[SGRAB + 10] = "";
 
   while (1) {
 #if !defined(CYGWIN_HACKS) && !defined(__sun__)
+#ifdef NO
     if (conf.watcher && waitpid(watcher, &status, WNOHANG))
       fatal("watcher PID died/stopped", 0);
+#endif
 #endif /* !CYGWIN_HACKS */
 
     /* Lets move some of this here, reducing the numer of actual