1--TEST-- 2pcntl_getpriority() - Wrong mode passed and also for non existing process id provided 3--EXTENSIONS-- 4pcntl 5posix 6--SKIPIF-- 7<?php 8 9require_once("pcntl_skipif_user_env_rules.inc"); 10 11if (!function_exists('pcntl_getpriority')) { 12 die('skip pcntl_getpriority doesn\'t exist'); 13} 14 15if (PHP_OS == "Darwin") { 16 die("skip This test is not for Darwin"); 17} 18 19?> 20--FILE-- 21<?php 22 23try { 24 pcntl_getpriority(null, PRIO_PGRP + PRIO_USER + PRIO_PROCESS + 10); 25} catch (ValueError $exception) { 26 echo $exception->getMessage() . "\n"; 27} 28 29// Different behavior in MacOS than rest of operating systems 30pcntl_getpriority(-1, PRIO_PROCESS); 31 32?> 33--EXPECTF-- 34pcntl_getpriority(): Argument #2 ($mode) must be one of PRIO_PGRP, PRIO_USER, or PRIO_PROCESS 35 36Warning: pcntl_getpriority(): Error %d: No process was located using the given parameters in %s 37