-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
writing to a read-only IOStream should fail #224
Comments
At the moment, I see the following behavior:
So reading from a write-only stream seems to fail with an error, however writing to a read-only stream doesn't error out, it only returns zero:
Should these two responses be matched? If so, what should the response be? This is typically the area where exceptions and such come into play in other languages, as it's pretty important to send IO errors and such back up to user flow control. However, you guys may have a different idea as to how this should be handled. |
possibly similar to #1701 [closed]. what is the thoughts on the I/O system behavior here? @loladiro this will possibly be relevant to us during libuv File API rewrite |
Seems like you can still write to a read-only IOStream as per the example above. |
* Compat for new unsafe wrapper methods * Correct version number * Fix tests * Avoid method overwrite * Define pointer_to_string for .3 * Fix pointer aliasing * Add docs
Likewise, reading from a write-only IOStream should probably fail too.
The text was updated successfully, but these errors were encountered: