<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -30,7 +30,7 @@ module God
       private
       
       def fetch_system_poller
-        if test(?d, '/proc')
+        if SlashProcPoller.usable?
           SlashProcPoller
         else
           PortablePoller</diff>
      <filename>lib/god/system/process.rb</filename>
    </modified>
    <modified>
      <diff>@@ -5,11 +5,25 @@ module God
       @@hertz = 100
       @@total_mem = nil
       
+      MeminfoPath = '/proc/meminfo'
+      UptimePath = '/proc/uptime'
+      
+      RequiredPaths = [MeminfoPath, UptimePath]
+      
+      # FreeBSD has /proc by default, but nothing mounted there!
+      # So we should check for the actual required paths!
+      # Returns true if +RequiredPaths+ are readable.
+      def self.usable?
+        RequiredPaths.all? do |path|
+          test(?r, path)
+        end
+      end
+      
       def initialize(pid)
         super(pid)
         
         unless @@total_mem # in K
-          File.open(&quot;/proc/meminfo&quot;) do |f|
+          File.open(MeminfoPath) do |f|
             @@total_mem = f.gets.split[1]
           end
         end
@@ -39,7 +53,7 @@ module God
       
       # in seconds
       def uptime
-        File.read('/proc/uptime').split[0].to_f
+        File.read(UptimePath).split[0].to_f
       end
       
       def stat</diff>
      <filename>lib/god/system/slash_proc_poller.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>74730d410fcb6603ace96f1dc55ea6196122532d</id>
    </parent>
  </parents>
  <author>
    <name>raggi</name>
    <email>jftucker@gmail.com</email>
  </author>
  <url>http://github.com/mojombo/god/commit/b6f9cad5479c102da63fe0c614751851d6540027</url>
  <id>b6f9cad5479c102da63fe0c614751851d6540027</id>
  <committed-date>2008-06-16T06:45:21-07:00</committed-date>
  <authored-date>2008-06-16T06:45:21-07:00</authored-date>
  <message> * Fixed support for operating systems with /proc, but no procfs (e.g. FreeBSD 7)</message>
  <tree>6d3592b059197888048c570033b1222fc8805ac3</tree>
  <committer>
    <name>raggi</name>
    <email>jftucker@gmail.com</email>
  </committer>
</commit>
