Bladeren bron

* checkpid() should stat() the file first

svn: 1038
Bryan Drewery 22 jaren geleden
bovenliggende
commit
d8077f01d8
1 gewijzigde bestanden met toevoegingen van 2 en 2 verwijderingen
  1. 2 2
      src/shell.c

+ 2 - 2
src/shell.c

@@ -76,8 +76,8 @@ int clear_tmp()
 
 #ifdef LEAF
 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);
     nuke_server("Cloned Process...");
     botnet_send_bye();