Forráskód Böngészése

Removing unnecessary OS comparison.

Signed-off-by: tianhe1986 <w1s2j3229@163.com>
tianhe1986 7 éve
szülő
commit
3d0f6ec18e
1 módosított fájl, 5 hozzáadás és 7 törlés
  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.');
                 }
             }