mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Use posix_getuid() to check for root in pcntl_setpriority() test
Using SUDO_USER doesn't seem to work on Travis ARM CI -- I guess that sudo might be in use without the target being root.
This commit is contained in:
parent
69b608cf13
commit
a3469146d4
1 changed files with 7 additions and 7 deletions
|
@ -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--
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue