Loading... (original) (raw)

Interruptible I/O has been purged from the JVM - see

JDK-4385444

and most recently

JDK-8036128

.

However we just spotted this lurking fragment in os_solaris.cpp os::Solaris::set_signal_handler:

} else if (sig == os::Solaris::SIGinterrupt()) {
// Interruptible i/o requires SA_RESTART cleared so EINTR
// is returned instead of restarting system calls
sigemptyset(&sigAct.sa_mask);
sigAct.sa_handler = NULL;
sigAct.sa_flags = SA_SIGINFO;
sigAct.sa_sigaction = sigINTRHandler;
}

There is no reason to not specify SA_RESTART - particularly as we never even generate a signal for "interruption" any more. It may be that the whole use of SIGinterrupt can be removed.