< prev index next >

src/hotspot/os/posix/os_posix.cpp

Print this page

        

*** 924,933 **** --- 924,945 ---- } return true; #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<num>" for a valid but unknown signal number // signal name otherwise. const char* os::exception_name(int sig, char* buf, size_t size) {
< prev index next >