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_sysconf.phpt
David Carlier ca5fd05536 ext/posix: adding POSIX_SC_OPEN_MAX constant.
returns the number of file descriptors that a process can handle.
e.g. useful after pcntl_fork() to close all the file descriptors up
to that boundary.

close GH-16681
2024-11-02 14:28:07 +00:00

17 lines
280 B
PHP

--TEST--
Test posix_sysconf
--EXTENSIONS--
posix
--FILE--
<?php
var_dump(posix_sysconf(-1));
var_dump(posix_errno() != 0);
var_dump(posix_sysconf(POSIX_SC_NPROCESSORS_ONLN));
var_dump(posix_sysconf(POSIX_SC_OPEN_MAX) >= 256);
?>
--EXPECTF--
int(-1)
bool(false)
int(%d)
bool(true)