RFR: 8259943: FileDescriptor.close0 does not handle EINTR
Brian Burkhalter
bpb at openjdk.java.net
Thu Jan 21 18:28:17 UTC 2021
On Thu, 21 Jan 2021 07:32:39 GMT, Alan Bateman <alanb 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.
I had it that way before creating the PR; will revert.
-------------
PR: https://git.openjdk.java.net/jdk/pull/2173
More information about the core-libs-dev
mailing list