Просмотр исходного кода

* Added code to eat zombie processes minutely (shouldn't interfere with anything)

svn: 2345
Bryan Drewery 21 лет назад
Родитель
Сommit
c5b26fcbcc
2 измененных файлов с 4 добавлено и 0 удалено
  1. 1 0
      doc/UPDATES
  2. 3 0
      src/main.c

+ 1 - 0
doc/UPDATES

@@ -20,6 +20,7 @@ Lines prefixed with '-' were disabled before release and are not finished, or ar
 * Added var 'auth-chan' which allows disabling auth cmds in all channels.
 * Added var 'auth-chan' which allows disabling auth cmds in all channels.
 * Fixed being able to 'chsecpass' a bot.
 * Fixed being able to 'chsecpass' a bot.
 * Fixed cmd_chsecpass to use whois_access() (#120)
 * Fixed cmd_chsecpass to use whois_access() (#120)
+* Added code to eat zombie processes minutely (shouldn't interfere with anything)
 
 
 1.2.6
 1.2.6
 * (REVERTED FROM 1.2.3) Disabled all memory allocations after a segfault (Fixes CPU spinning)
 * (REVERTED FROM 1.2.3) Disabled all memory allocations after a segfault (Fixes CPU spinning)

+ 3 - 0
src/main.c

@@ -506,6 +506,9 @@ static int washub = -1;
 
 
 static void core_minutely()
 static void core_minutely()
 {
 {
+  //eat some zombies!
+  waitpid(-1, NULL, WNOHANG);
+
   if (!conf.bot->hub) {
   if (!conf.bot->hub) {
     if (washub == -1)
     if (washub == -1)
       washub = conf.bot->hub;
       washub = conf.bot->hub;