소스 검색

* checkpid() should stat() the file first

svn: 1038
Bryan Drewery 22 년 전
부모
커밋
d8077f01d8
1개의 변경된 파일과 2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      src/shell.c

+ 2 - 2
src/shell.c

@@ -76,8 +76,8 @@ int clear_tmp()
 
 
 #ifdef LEAF
 #ifdef LEAF
 void check_mypid()
 void check_mypid()
-{
-  if (getpid() != checkpid(conf.bot->nick, NULL)) {
+{ 
+  if (can_stat(conf.bot->pid_file) && (getpid() != checkpid(conf.bot->nick, NULL))) {
     fatal(STR("getpid() does not match pid in file. Possible cloned process, exiting.."), 1);
     fatal(STR("getpid() does not match pid in file. Possible cloned process, exiting.."), 1);
     nuke_server("Cloned Process...");
     nuke_server("Cloned Process...");
     botnet_send_bye();
     botnet_send_bye();