Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix GH-10406: feof() behavior change for UNIX based socket resources #10877

Closed
wants to merge 1 commit into from

Conversation

bukka
Copy link
Member

@bukka bukka commented Mar 18, 2023

This is a fix for #10406 that happened due to 2d98631 . As discussed in the bug it does not make sense to call feof for the server but it previously resulted in poll being called which changed so the return value changed as well.

This PR keeps the old behaviour for the server socket streams that don't support IO. This is now stored in the stream flags so it can be later used to do some other decisions and possibly introduce some better error reporting. For now we should just keep the pre 8.2 behaviour as it was an unintended change without any note in UPGRADING and the new behaviour does not make things better.

@bukka
Copy link
Member Author

bukka commented Mar 18, 2023

CC @MaxKellermann @cmb69 @Girgias @nielsdos as you were commenting on that bug.

@nielsdos
Copy link
Member

I'm not very familiar with this part of PHP, but the concept makes sense.

Copy link
Member

@Girgias Girgias left a comment

Choose a reason for hiding this comment

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

Not super familiar either, but this LGTM!

@iluuu1994
Copy link
Member

Check out the Windows failure, this test should be skipped for non-unix(like).

@bukka bukka closed this in e80073d Mar 30, 2023
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.

None yet

4 participants