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

propagate errors from flush within close #35326

Merged
merged 1 commit into from
Apr 6, 2020
Merged

Conversation

JeffBezanson
Copy link
Member

Alternative to #35303.

@JeffBezanson JeffBezanson added the io Involving the I/O subsystem: libuv, read, write, etc. label Mar 31, 2020
{
ios_flush(s);
int err = ios_flush(s);
if (s->fd != -1 && s->ownfd)
close(s->fd);
Copy link
Member

Choose a reason for hiding this comment

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

check the return value of close also. Some file systems don't sync the buffers to disk until the fd is closed even with a preceding flush.

@JeffBezanson JeffBezanson merged commit 06f3467 into master Apr 6, 2020
@JeffBezanson JeffBezanson deleted the jb/closeerror branch April 6, 2020 17:56
ravibitsgoa pushed a commit to ravibitsgoa/julia that referenced this pull request Apr 9, 2020
ztultrebor pushed a commit to ztultrebor/julia that referenced this pull request Apr 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
io Involving the I/O subsystem: libuv, read, write, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants