Skip to content

Commit fae1628

Browse files
committed
8293493: Signal Handlers printout should show signal block state
Backport-of: d14e96d9701dae951aa365029f58afb6687a646a
1 parent d1ad596 commit fae1628

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
@@ -1381,7 +1381,6 @@ static void print_single_signal_handler(outputStream* st,
13811381
st->print(", flags=");
13821382
int flags = get_sanitized_sa_flags(act);
13831383
print_sa_flags(st, flags);
1384-
13851384
}
13861385

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

14001399
print_single_signal_handler(st, &current_act, buf, buflen);
1400+
1401+
sigset_t thread_sig_mask;
1402+
if (::pthread_sigmask(/* ignored */ SIG_BLOCK, NULL, &thread_sig_mask) == 0) {
1403+
st->print(", %s", sigismember(&thread_sig_mask, sig) ? "blocked" : "unblocked");
1404+
}
14011405
st->cr();
14021406

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

0 commit comments

Comments
 (0)