1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00
Files
archived-php-src/ext/posix/tests/posix_getsid_error.phpt
David Carlier f72105be81 ext/posix: value ranges check for posix_setrlimit and posix_setpgid
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
2025-07-29 13:10:26 +01:00

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