]> granicus.if.org Git - php/commitdiff
Suppress warning in pcntl_unshare skipif
authorNikita Popov <nikita.ppv@gmail.com>
Tue, 4 Aug 2020 14:05:11 +0000 (16:05 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Wed, 5 Aug 2020 07:46:07 +0000 (09:46 +0200)
ext/pcntl/tests/pcntl_unshare_01.phpt

index d914723dc17f5ddd01f26e787abc6ac99cfdd580..815a3ce964b547e76571e29c84e7a1eff45a1cf9 100644 (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");
 }