-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Discard 0-sized writes to files (#7638)
* Discard 0-sized writes to files This commit comes from #7633 where Windows and Unix would behave differently when writing at a particular file offset. Notably Unix semantics [indicate]: > Before any action described below is taken, and if nbyte is zero > and the file is a regular file, the write() function may detect > and return errors as described below. In the absence of errors, > or if error detection is not performed, the write() function > shall return zero and have no other results. If nbyte is zero and > the file is not a regular file, the results are unspecified. These semantics are a bit easier to emulate on Windows so the host implementation now discards any attempt to perform I/O if a zero-sized write is detected. [indicate]: https://man7.org/linux/man-pages/man3/write.3p.html Closes #7633 * Discard empty writes in wasi-common as well
- Loading branch information
1 parent
85ffc39
commit df67fe8
Showing
4 changed files
with
63 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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