Closed
Conversation
Member
Author
|
@nodejs/fs @mcollina |
ronag
commented
Dec 25, 2022
| throw new ERR_METHOD_NOT_IMPLEMENTED('open()'); | ||
| }, | ||
| close: (fd, cb) => { | ||
| handle.off('close', closeHandler); |
Member
Author
There was a problem hiding this comment.
Avoid keeping stream alive until file handle is closed.
ronag
commented
Dec 25, 2022
| () => cb(), cb); | ||
| if (handle[kFd] !== -1) { | ||
| // Someone else has a ref to the handle. | ||
| process.nextTick(cb); |
Member
Author
There was a problem hiding this comment.
stream can finish teardown even if file handle isn't closed, if it has refs
ronag
commented
Dec 25, 2022
| () => { this[kClosePromise] = undefined; } | ||
| () => { | ||
| this[kClosePromise] = undefined; | ||
| this.emit('close'); |
Member
Author
There was a problem hiding this comment.
Only emit close after actually closing.
Contributor
|
I'm afraid this PR flew under people's radar. |
aduh95
reviewed
Mar 3, 2023
Contributor
aduh95
left a comment
There was a problem hiding this comment.
LGTM except the test failures
aduh95
reviewed
Mar 3, 2023
Contributor
aduh95
left a comment
There was a problem hiding this comment.
LGTM except the test failures
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.
Minor fixes found while reviewing code. I don't plan on working further on this so if someone wants to finish up with the test be my guest.