piwik/piwik — pull request #5965 by snout1979 (2014-08-10 17:36:34+00:00)
Title: Improve detection of proc filesystem that works despite potential open_b...

Testing if /proc is a resource with @fopen fails on systems with open_basedir set. Addind /proc to the open_basedir is undesired and not always an option, resulting in a system that uses the HTTP API (with increased risk of timeouts) instead of the async CLI method.

Additionally, by using stat we not only test the existance of /proc, but also confirm it's actually a 'proc' filesystem - just in case.