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

fs: WriteStream should handle partial writes #22740

Closed
wants to merge 1 commit into from

Commits on Sep 20, 2018

  1. fs: WriteStream should handle partial writes

    Given a buffer of length l, fs.write() will not necessarily write the
    entire buffer to the file. This can occur if, for example, there is
    insufficient space on the underlying physical medium.
    
    WriteStream did not handle this case, and when partial write occurs,
    it will errorneously report that the write is successful.
    
    This commit changes the _write() behavior to continue the write
    operation, picking up from where the last operation left off.
    
    More information about the write() system call is available at
    http://man7.org/linux/man-pages/man2/write.2.html
    Keen Yee Liau committed Sep 20, 2018
    Configuration menu
    Copy the full SHA
    6456af8 View commit details
    Browse the repository at this point in the history