From 99136cbf3183833b5d9dedb7943873fb8c3a8da5 Mon Sep 17 00:00:00 2001 From: avkarenow Date: Wed, 11 Aug 2021 03:45:40 +0200 Subject: [PATCH] Remove checking for /proc existence (#17846) --- core/CliMulti/Process.php | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/core/CliMulti/Process.php b/core/CliMulti/Process.php index ca1aa91e919..fc27c6b7b81 100644 --- a/core/CliMulti/Process.php +++ b/core/CliMulti/Process.php @@ -236,10 +236,6 @@ public static function isSupportedWithReason() $reasons[] = 'awk is not available or did not run as we would expect it to'; } - if (!self::isProcFSMounted() && !SettingsServer::isMac()) { - $reasons[] = 'procfs is not mounted'; - } - return $reasons; } @@ -287,21 +283,6 @@ private static function returnsSuccessCode($command) return 0 == (int) $returnCode; } - /** - * ps -e requires /proc - * @return bool - */ - private static function isProcFSMounted() - { - if (is_resource(@fopen('/proc', 'r'))) { - return true; - } - // Testing if /proc is a resource with @fopen fails on systems with open_basedir set. - // by using stat we not only test the existence of /proc but also confirm it's a 'proc' filesystem - $type = @shell_exec('stat -f -c "%T" /proc 2>/dev/null'); - return strpos($type, 'proc') === 0; - } - public static function getListOfRunningProcesses() { $processes = @shell_exec(self::PS_COMMAND . ' 2>/dev/null');