diff options
Diffstat (limited to 'ext/pcntl/tests')
| -rw-r--r-- | ext/pcntl/tests/pcntl_setpriority_basic.phpt | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/ext/pcntl/tests/pcntl_setpriority_basic.phpt b/ext/pcntl/tests/pcntl_setpriority_basic.phpt index 1f03fb2dc9..235b0ec9ce 100644 --- a/ext/pcntl/tests/pcntl_setpriority_basic.phpt +++ b/ext/pcntl/tests/pcntl_setpriority_basic.phpt @@ -5,14 +5,14 @@ Er Galvão Abbott galvao@galvao.eti.br # TestFest 2017 PHPRS PHP UG 2017-10-31 --SKIPIF-- <?php -if (!isset($_SERVER['SUDO_USER'])) { - die('skip - this functions needs to run with superuser'); -} - if (!extension_loaded('pcntl')) { - die('skip - ext/pcntl not loaded'); -} else if (!function_exists('pcntl_setpriority')) { - die('skip - pcntl_setpriority doesn\'t exist'); + die('skip ext/pcntl not loaded'); +} +if (!function_exists('pcntl_setpriority')) { + die('skip pcntl_setpriority doesn\'t exist'); +} +if (!function_exists('posix_getuid') || posix_getuid() !== 0) { + die('skip this functions needs to run with superuser'); } ?> --FILE-- |
