1--TEST--
2pcntl_setpriority() - Check for errors
3--EXTENSIONS--
4pcntl
5posix
6--SKIPIF--
7<?php
8
9require_once("pcntl_skipif_user_env_rules.inc");
10
11if (!function_exists('pcntl_setpriority')) {
12    die('skip pcntl_setpriority doesn\'t exist');
13}
14
15if (PHP_OS !== "Linux") {
16    die("skip This test only runs on Linux");
17}
18
19?>
20--FILE--
21<?php
22
23pcntl_setpriority(-1000, 1);
24pcntl_setpriority(-1000, 0);
25
26?>
27--EXPECTF--
28Warning: pcntl_setpriority(): Error 1: A process was located, but neither its effective nor real user ID matched the effective user ID of the caller in %s
29
30Warning: pcntl_setpriority(): Error 13: Only a super user may attempt to increase the process priority in %s on line %d
31