]> git.donarmstrong.com Git - infobot.git/commitdiff
- we opened a linux-specific /proc file globally - fixed. found by m00.
authordms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Wed, 6 Mar 2002 15:01:53 +0000 (15:01 +0000)
committerdms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Wed, 6 Mar 2002 15:01:53 +0000 (15:01 +0000)
git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@554 c11ca15a-4712-0410-83d8-924469b57eb5

src/core.pl

index a7ba007a4e60fb0eb48abd7d9e16816c9995a528..8dc7d46935008ebea6816bb8fd0ec659d4f03526 100644 (file)
@@ -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 (<IN>) {
            $memusage = $1 if (/^VmSize:\s+(\d+) kB/);
        }