src/hotspot/os/posix/os_posix.cpp
changeset 50177 9806f23d5e5e
parent 49594 898ef81cbc0e
child 50333 7cea35f78b50
equal deleted inserted replaced
50176:0cc29ebee3f9 50177:9806f23d5e5e
   924   }
   924   }
   925   return true;
   925   return true;
   926 #endif
   926 #endif
   927 }
   927 }
   928 
   928 
       
   929 bool os::Posix::is_sig_ignored(int sig) {
       
   930   struct sigaction oact;
       
   931   sigaction(sig, (struct sigaction*)NULL, &oact);
       
   932   void* ohlr = oact.sa_sigaction ? CAST_FROM_FN_PTR(void*,  oact.sa_sigaction)
       
   933                                  : CAST_FROM_FN_PTR(void*,  oact.sa_handler);
       
   934   if (ohlr == CAST_FROM_FN_PTR(void*, SIG_IGN)) {
       
   935     return true;
       
   936   } else {
       
   937     return false;
       
   938   }
       
   939 }
       
   940 
   929 // Returns:
   941 // Returns:
   930 // NULL for an invalid signal number
   942 // NULL for an invalid signal number
   931 // "SIG<num>" for a valid but unknown signal number
   943 // "SIG<num>" for a valid but unknown signal number
   932 // signal name otherwise.
   944 // signal name otherwise.
   933 const char* os::exception_name(int sig, char* buf, size_t size) {
   945 const char* os::exception_name(int sig, char* buf, size_t size) {