Browse Source

* checkpid() should stat() the file first

svn: 1038
Bryan Drewery 22 years ago
parent
commit
d8077f01d8
1 changed files with 2 additions and 2 deletions
  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();