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

Files are not flushed on process exit #3624

Closed
tanmaykm opened this issue Jul 4, 2013 · 0 comments
Closed

Files are not flushed on process exit #3624

tanmaykm opened this issue Jul 4, 2013 · 0 comments
Labels
bug Indicates an unexpected problem or unintended behavior

Comments

@tanmaykm
Copy link
Member

tanmaykm commented Jul 4, 2013

This would most likely create a 0 byte file if the process exits immediately after:

write(open("t", "w"), "hello")

Whereas this behaves properly:

f = open("t", "w")
write(f, "hello")
flush(f)

Can be a source of subtle bugs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

1 participant