RFR [8055421]: (fs) bad error handling in java.base/unix/native/libnio/fs/UnixNativeDispatcher.c
Martin Buchholz
martinrb at google.com
Thu Aug 21 23:30:32 UTC 2014
Ivan, I think your change for fclose is incorrect, you are discarding the
handling for errno = EINTR.
I don't think any man page could be serious about not calling fclose again
if it returned with errno = EINTR!
{
int res;
FILE* fp = jlong_to_ptr(stream);
- do {
res = fclose(fp);
- } while (res == EOF && errno == EINTR);
- if (res == EOF) {
+ if (res == EOF && errno != EINTR) {
throwUnixException(env, errno);
}
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/nio-dev/attachments/20140821/c57e3159/attachment.html>
More information about the nio-dev
mailing list