4 ms·
As an aside, the code is also wrong and will fail in some rare cases because it assumes that the `read` syscall will only return partial information if you are
by ayende 5y ago
As an aside, the code is also wrong and will fail in some rare cases because it assumes that the `read` syscall will only return partial information if you are at the end of the file. This is false, however, and will lead to data loss if happen.
Full post with details here:
https://ayende.com/blog/196289-C/dont-assume-the-result-of-read?key=655659fbe11d49d8a953cbacdc97b3d4 https://ayende.com/blog/196289-C/dont-assume-the-result-of-r...