Skip to content

Commit

Permalink
8293493: Signal Handlers printout should show signal block state
Browse files Browse the repository at this point in the history
Backport-of: d14e96d9701dae951aa365029f58afb6687a646a
  • Loading branch information
tstuefe committed Jan 27, 2023
1 parent d1ad596 commit fae1628
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/hotspot/os/posix/signals_posix.cpp
Expand Up @@ -1381,7 +1381,6 @@ static void print_single_signal_handler(outputStream* st,
st->print(", flags=");
int flags = get_sanitized_sa_flags(act);
print_sa_flags(st, flags);

}

// Print established signal handler for this signal.
Expand All @@ -1398,6 +1397,11 @@ void PosixSignals::print_signal_handler(outputStream* st, int sig,
sigaction(sig, NULL, &current_act);

print_single_signal_handler(st, &current_act, buf, buflen);

sigset_t thread_sig_mask;
if (::pthread_sigmask(/* ignored */ SIG_BLOCK, NULL, &thread_sig_mask) == 0) {
st->print(", %s", sigismember(&thread_sig_mask, sig) ? "blocked" : "unblocked");
}
st->cr();

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

1 comment on commit fae1628

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.