FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

docs(async): state what ZEND_ASYNC_IO_PRESERVE_FD reaches by EdmondDantes · Pull Request #30 · true-async/php-src · GitHub

forked from php/php-src

docs(async): state what ZEND_ASYNC_IO_PRESERVE_FD reaches - #30

Merged
EdmondDantes merged 1 commit into
true-asyncfrom
async-api-preserve-fd-contract
Aug 25, 2026
Merged

docs(async): state what ZEND_ASYNC_IO_PRESERVE_FD reaches#30
EdmondDantes merged 1 commit into
true-asyncfrom
async-api-preserve-fd-contract

Conversation

Copy link
Copy Markdown

ZEND_ASYNC_IO_PRESERVE_FD carried no prose, and its real contract turned out to be narrower than every caller assumed: it reaches only a descriptor the reactor closes on its own account. A descriptor adopted by a libuv stream handle is outside it — the handle owns the descriptor and uv_close closes it whatever the flag says.

That gap cost a real defect in true-async/server (issue php#293): a log sink passed the flag for a TCP socket, kept the PHP stream on the strength of it, and the socket was closed twice — WSAENOTSOCK on Windows, a silent EBADF on POSIX, which is the worse half because the descriptor number is reused and the late close lands on another connection.

Header comment only, no behaviour change.

EdmondDantes merged commit 7a0e411 into true-async Aug 25, 2026
9 of 17 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant


Back | FazBrowse Home | New Git URL