]> git.donarmstrong.com Git - infobot.git/commitdiff
Added catch just in case if forked
authordms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Wed, 30 Aug 2000 13:33:08 +0000 (13:33 +0000)
committerdms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Wed, 30 Aug 2000 13:33:08 +0000 (13:33 +0000)
git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@61 c11ca15a-4712-0410-83d8-924469b57eb5

src/Modules/Uptime.pl

index 40bdb4009e50e067bbd93bdc6d75e6308146ce6a..c1897f7fd328be6a96d604aeb76178d32a7e2790 100644 (file)
@@ -67,6 +67,11 @@ sub uptimeWriteFile {
   my @results = &uptimeGetInfo();
   my $file = $file{utm};
 
+  if ($$ != $bot_pid) {
+    &WARN("uptime: forked process doing weird things! FIXME");
+    exit 0;
+  }
+
   if (!open(OUT,">$file")) {
     &status("error: cannot write to $file.");
     return;