Suppress warning in pcntl_unshare skipif

This commit is contained in:
Nikita Popov 2020-08-04 16:05:11 +02:00
parent 4cc4f9c00a
commit fcfa0a46c3

View File

@ -6,7 +6,7 @@ if (!extension_loaded("pcntl")) die("skip");
if (!extension_loaded("posix")) die("skip posix extension not available");
if (!function_exists("pcntl_unshare")) die("skip pcntl_unshare is not available");
if (!defined("CLONE_NEWUSER")) die("skip flag unavailable");
if (pcntl_unshare(CLONE_NEWUSER) == false && pcntl_get_last_error() == PCNTL_EPERM) {
if (@pcntl_unshare(CLONE_NEWUSER) == false && pcntl_get_last_error() == PCNTL_EPERM) {
die("skip Insufficient previleges to use CLONE_NEWUSER");
}