diff -r 0cc29ebee3f9 -r 9806f23d5e5e src/hotspot/os/posix/os_posix.cpp --- a/src/hotspot/os/posix/os_posix.cpp Fri May 18 10:59:04 2018 +0200 +++ b/src/hotspot/os/posix/os_posix.cpp Fri May 18 08:47:42 2018 -0400 @@ -926,6 +926,18 @@ #endif } +bool os::Posix::is_sig_ignored(int sig) { + struct sigaction oact; + sigaction(sig, (struct sigaction*)NULL, &oact); + void* ohlr = oact.sa_sigaction ? CAST_FROM_FN_PTR(void*, oact.sa_sigaction) + : CAST_FROM_FN_PTR(void*, oact.sa_handler); + if (ohlr == CAST_FROM_FN_PTR(void*, SIG_IGN)) { + return true; + } else { + return false; + } +} + // Returns: // NULL for an invalid signal number // "SIG" for a valid but unknown signal number