Skip to content

Commit d14e96d

Browse files
committed
8293493: Signal Handlers printout should show signal block state
Reviewed-by: dholmes, jsjolen
1 parent da4fdfb commit d14e96d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/hotspot/os/posix/signals_posix.cpp

+5-1
Original file line numberDiff line numberDiff line change
@@ -1404,7 +1404,6 @@ static void print_single_signal_handler(outputStream* st,
14041404
st->print(", flags=");
14051405
int flags = get_sanitized_sa_flags(act);
14061406
print_sa_flags(st, flags);
1407-
14081407
}
14091408

14101409
// Print established signal handler for this signal.
@@ -1421,6 +1420,11 @@ void PosixSignals::print_signal_handler(outputStream* st, int sig,
14211420
sigaction(sig, NULL, &current_act);
14221421

14231422
print_single_signal_handler(st, &current_act, buf, buflen);
1423+
1424+
sigset_t thread_sig_mask;
1425+
if (::pthread_sigmask(/* ignored */ SIG_BLOCK, NULL, &thread_sig_mask) == 0) {
1426+
st->print(", %s", sigismember(&thread_sig_mask, sig) ? "blocked" : "unblocked");
1427+
}
14241428
st->cr();
14251429

14261430
// If we expected to see our own hotspot signal handler but found a different one,

0 commit comments

Comments
 (0)