diff options
| author | Nikita Popov <nikita.ppv@gmail.com> | 2020-08-05 12:12:24 +0200 |
|---|---|---|
| committer | Nikita Popov <nikita.ppv@gmail.com> | 2020-08-05 12:12:24 +0200 |
| commit | 7575340427109fb5dde02cdc2ca83d78a5786426 (patch) | |
| tree | 69a55509f8f866936b9778a12336613fc38be3f7 /ext/pcntl/tests | |
| parent | 879525efa8a9f5c194fca980258d7076173e350b (diff) | |
| parent | 25bdf9d3e0aa8375443bc0b587fc9d2f48caee59 (diff) | |
| download | php-git-7575340427109fb5dde02cdc2ca83d78a5786426.tar.gz | |
Merge branch 'PHP-7.4'
* PHP-7.4:
Check ps -p availability in proc_nice test
Set AI_CANONNAME flag in socket_addrinfo test
Add ipv6 skipif to test
Improve privilege check in pcntl_setpriority() test
Diffstat (limited to 'ext/pcntl/tests')
| -rw-r--r-- | ext/pcntl/tests/pcntl_setpriority_basic.phpt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/pcntl/tests/pcntl_setpriority_basic.phpt b/ext/pcntl/tests/pcntl_setpriority_basic.phpt index 235b0ec9ce..0c92245e1e 100644 --- a/ext/pcntl/tests/pcntl_setpriority_basic.phpt +++ b/ext/pcntl/tests/pcntl_setpriority_basic.phpt @@ -11,8 +11,8 @@ if (!extension_loaded('pcntl')) { 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'); +if (@pcntl_setpriority(-5) === false && pcntl_get_last_error() == PCNTL_EACCES) { + die('skip this function needs to run with CAP_SYS_NICE privileges'); } ?> --FILE-- |
