Skip to content

main/poll: Record wait() error on every backend#22326

Open
iliaal wants to merge 1 commit into
php:masterfrom
iliaal:fix/poll-wait-error-recording
Open

main/poll: Record wait() error on every backend#22326
iliaal wants to merge 1 commit into
php:masterfrom
iliaal:fix/poll-wait-error-recording

Conversation

@iliaal

@iliaal iliaal commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

php_poll_wait() reported a stale error code when a backend's wait syscall failed without recording one. epoll, poll and kqueue returned -1 without setting it, so record it from errno and php_poll_get_error() then reflects the real failure. eventport and wsapoll already did this, the latter from WSAGetLastError(). Split out of #22316 on review.

@iliaal iliaal requested a review from bukka as a code owner June 15, 2026 23:31
php_poll_wait() reported a stale error code when a backend's wait syscall
failed without recording one: epoll, poll and kqueue returned -1 without
setting it. Record it from errno in those backends so php_poll_get_error()
reflects the actual failure. eventport and wsapoll already did, the
latter from WSAGetLastError().

Closes phpGH-22326
@iliaal iliaal force-pushed the fix/poll-wait-error-recording branch from c8d8034 to 2ac5e47 Compare June 15, 2026 23:31
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