diff --git a/lib/unix_daemon.rb b/lib/unix_daemon.rb
index <HASH>..<HASH> 100644
--- a/lib/unix_daemon.rb
+++ b/lib/unix_daemon.rb
@@ -76,7 +76,9 @@ module ActsAsFerret
       # checked on ubuntu and OSX only
       def process_exists(pid)
         ps = IO.popen("ps -fp #{pid}", "r")
-        ps.to_a[1] =~ /ferret_server/
+        process = ps.to_a[1]
+        ps.close
+        process =~ /ferret_server/
       end
 
     end
close pipe so defunct ps process is not left hanging around