소스 검색

* Remove pidfile right before we call system() in restart() to attempt to fix the duplicate bots bug

svn: 1667
Bryan Drewery 21 년 전
부모
커밋
ad5b254c1e
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/misc.c

+ 1 - 1
src/misc.c

@@ -633,8 +633,8 @@ restart(int idx)
   }
   fatal(idx <= 0x7FF0 ? reason : NULL, 1);
   usleep(2000 * 500);
-  unlink(conf.bot->pid_file); /* if this fails it is ok, cron will restart the bot, *hopefully* */
   sprintf(buf, "%s -B %s\n", binname, conf.bot->nick);
+  unlink(conf.bot->pid_file); /* if this fails it is ok, cron will restart the bot, *hopefully* */
   system(buf); /* start new bot. */
   exit(0);
 }