Ver Fonte

Removing unnecessary OS comparison.

Signed-off-by: tianhe1986 <w1s2j3229@163.com>
tianhe1986 há 7 anos atrás
pai
commit
3d0f6ec18e
1 ficheiros alterados com 5 adições e 7 exclusões
  1. 5 7
      Worker.php

+ 5 - 7
Worker.php

@@ -552,13 +552,11 @@ class Worker
             }
 
             // Get unix user of the worker process.
-            if (static::$_OS === 'linux') {
-                if (empty($worker->user)) {
-                    $worker->user = static::getCurrentUser();
-                } else {
-                    if (posix_getuid() !== 0 && $worker->user != static::getCurrentUser()) {
-                        static::log('Warning: You must have the root privileges to change uid and gid.');
-                    }
+            if (empty($worker->user)) {
+                $worker->user = static::getCurrentUser();
+            } else {
+                if (posix_getuid() !== 0 && $worker->user != static::getCurrentUser()) {
+                    static::log('Warning: You must have the root privileges to change uid and gid.');
                 }
             }