RFR: 8259943: FileDescriptor.close0 does not handle EINTR
Alan Bateman
alanb at openjdk.java.net
Thu Jan 21 07:35:57 UTC 2021
On Wed, 20 Jan 2021 23:01:19 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:
> Please review this small change to handle `EINTR` from `close()` in `fileDescriptorClose()`. The function `handleGetLength()` is also changed to handle `EINTR` from `fstat64()` to match other uses of `fstat64()` in the file.
src/java.base/unix/native/libjava/io_util_md.c line 167:
> 165: } else {
> 166: int result;
> 167: RESTARTABLE(close(fd), result);
close is not restartable (except AIX apparently). This means you have to explicitly handle EINTR, see UnixNativeDispatcher.close0 for an example.
-------------
PR: https://git.openjdk.java.net/jdk/pull/2173
More information about the core-libs-dev
mailing list