We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 69b608c commit a346914Copy full SHA for a346914
ext/pcntl/tests/pcntl_setpriority_basic.phpt
@@ -5,14 +5,14 @@ Er Galvão Abbott [email protected]
5
# TestFest 2017 PHPRS PHP UG 2017-10-31
6
--SKIPIF--
7
<?php
8
-if (!isset($_SERVER['SUDO_USER'])) {
9
- die('skip - this functions needs to run with superuser');
10
-}
11
-
12
if (!extension_loaded('pcntl')) {
13
- die('skip - ext/pcntl not loaded');
14
-} else if (!function_exists('pcntl_setpriority')) {
15
- 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');
16
}
17
?>
18
--FILE--
0 commit comments