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

Use fs.closeSync #22172

Closed
wants to merge 1 commit into from
Closed

Use fs.closeSync #22172

wants to merge 1 commit into from

Conversation

BridgeAR
Copy link

Switch to fs.closeSync over fs.close, otherwise this will fail when used with Node.js 10.x.
See nodejs/node#18668

@@ -92012,7 +92012,7 @@ var ts;
};
Logger.prototype.close = function () {
if (this.fd >= 0) {
fs.close(this.fd);
Copy link
Contributor

Choose a reason for hiding this comment

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

why not just add an empty handler instead?

Copy link
Author

Choose a reason for hiding this comment

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

Because errors will be silently swallowed that way. I can of course do that but I do not feel like that is a good idea.

Copy link
Contributor

Choose a reason for hiding this comment

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

Because errors will be silently swallowed that way.

that was the intention anyways.. we are killing the server, we want to try to write to the log if we can, but if we fail, not sure we have much recourse here, the process is dying anyways.

@mhegazy
Copy link
Contributor

mhegazy commented Mar 8, 2018

closing in favor of #22405

@mhegazy mhegazy closed this Mar 8, 2018
@microsoft microsoft locked and limited conversation to collaborators Jul 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants