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=aca63e07225765a505836995fefc646253918b7e;p=infobot.git Added catch just in case if forked git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@61 c11ca15a-4712-0410-83d8-924469b57eb5 --- diff --git a/src/Modules/Uptime.pl b/src/Modules/Uptime.pl index 40bdb40..c1897f7 100644 --- a/src/Modules/Uptime.pl +++ b/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;