RFR: JDK-8327468: Do not restart close if errno is EINTR [macOS/linux]

Alan Bateman alanb at openjdk.org
Fri Mar 8 10:27:53 UTC 2024


On Fri, 8 Mar 2024 10:12:06 GMT, Matthias Baesken <mbaesken at openjdk.org> wrote:

> There are a number of places remaining in the linux/macOS native JDK codebase where we use the RESTARTABLE macro with close, but this is unwanted on Linux/macOS.

src/jdk.attach/linux/native/libattach/VirtualMachineImpl.c line 200:

> 198:     if (res == -1) {
> 199:         JNU_ThrowIOExceptionWithLastError(env, "close");
> 200:     }

I assume it would be better to not stop when errno is EINTR. If there is a profiler or some other tool firing signals at threads then there isn't anything that can be done here.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/18164#discussion_r1517532415


More information about the serviceability-dev mailing list