From: dms Date: Wed, 6 Mar 2002 15:01:53 +0000 (+0000) Subject: - we opened a linux-specific /proc file globally - fixed. found by m00. X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=d35f433259a86215815b5254b0d605b2fe68f41c;p=infobot.git - we opened a linux-specific /proc file globally - fixed. found by m00. git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@554 c11ca15a-4712-0410-83d8-924469b57eb5 --- diff --git a/src/core.pl b/src/core.pl index a7ba007..8dc7d46 100644 --- a/src/core.pl +++ b/src/core.pl @@ -330,12 +330,12 @@ sub findChanConf { sub showProc { my ($prefix) = $_[0] || ""; - if (!open(IN, "/proc/$$/status")) { - &ERROR("cannot open '/proc/$$/status'."); - return; - } - if ($^O eq "linux") { + if (!open(IN, "/proc/$$/status")) { + &ERROR("cannot open '/proc/$$/status'."); + return; + } + while () { $memusage = $1 if (/^VmSize:\s+(\d+) kB/); }