Allow repeated close of any IO to succeed.#5713
Open
headius wants to merge 1 commit intojruby:masterfrom
Open
Conversation
This relates to jruby#5709 but breaks at least one spec: ``` File.open opens a file with a file descriptor d and a block FAILED Expected Errno::EBADF but no exception was raised (nil was returned) /Users/headius/projects/jruby/spec/ruby/core/file/open_spec.rb:173:in `block in <main>' ``` There may be other failures, but it's debateable whether they represent behavior we need to emulate.
00ac7ee to
779ad30
Compare
Member
Author
|
Looks like there's other failures, but I'm still unconvinced if the differing behavior is important. |
headius
added a commit
to headius/jruby
that referenced
this pull request
Jun 4, 2019
This allows failed connections from sockets (jruby#5709, jruby#5754) to raise the actual socket error even though the logic in socket.rb tries to close the failed socket. This approach differs from jruby#5713 in that it modifies the final flush logic to skip closed channels rather than modifying the IO#closed? logic to do that same check.
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This relates to #5709 but breaks at least one spec:
There may be other failures, but it's debateable whether they
represent behavior we need to emulate.