Skip to content

Fix php://fd/ on platforms without getdtablesize() - #23563

Open
shyim wants to merge 1 commit into
php:masterfrom
shyim:fix-getdtablesize
Open

Fix php://fd/ on platforms without getdtablesize()#23563
shyim wants to merge 1 commit into
php:masterfrom
shyim:fix-getdtablesize

Conversation

@shyim

@shyim shyim commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

HAVE_UNISTD_H does not imply that getdtablesize() exists. Detect the function at configure time.

HAVE_UNISTD_H does not imply that getdtablesize() exists. Detect the
function at configure time and fall back to INT_MAX when it is missing,
matching the existing no-unistd path.

@TimWolla TimWolla left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The man page for getdtablesize says:

CONFORMING TO
SVr4, 4.4BSD (the getdtablesize() function first appeared in 4.2BSD). It is not specified in POSIX.1; portable applications should employ sysconf(_SC_OPEN_MAX) instead of this call.

Should we use _SC_OPEN_MAX instead?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants