mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
setpgid accepts values from 0 to "PID_MAX". for setrlimit the culprit is using zend_long to represent rlim_t but at least we accept -1 for RLIM_INFINITY, however rl_cur should not be greater than rl_max value. close GH-19281
20 lines
407 B
PHP
20 lines
407 B
PHP
--TEST--
|
|
Test posix_getsid() function : error conditions
|
|
--DESCRIPTION--
|
|
cases: no params, wrong param, wrong param range
|
|
--CREDITS--
|
|
Moritz Neuhaeuser, info@xcompile.net
|
|
PHP Testfest Berlin 2009-05-10
|
|
--EXTENSIONS--
|
|
posix
|
|
--FILE--
|
|
<?php
|
|
try {
|
|
posix_getsid(-1);
|
|
} catch (\ValueError $e) {
|
|
echo $e->getMessage(), PHP_EOL;
|
|
}
|
|
?>
|
|
--EXPECTF--
|
|
posix_getsid(): Argument #1 ($process_id) must be between 0 and %d
|