From: dms Date: Wed, 30 Aug 2000 13:33:08 +0000 (+0000) Subject: Added catch just in case if forked X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=7499cb7dd53f42735c8357bc20039b6e43dd49ad;p=infobot.git Added catch just in case if forked git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk@61 c11ca15a-4712-0410-83d8-924469b57eb5 --- diff --git a/blootbot/src/Modules/Uptime.pl b/blootbot/src/Modules/Uptime.pl index 40bdb40..c1897f7 100644 --- a/blootbot/src/Modules/Uptime.pl +++ b/blootbot/src/Modules/Uptime.pl @@ -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;