6536943: Bogus -Xcheck:jni warning for SIG_INT action for SIGINT in JVM started from non-interactive shell
Under non-interactive shell, with -Xcheck:jni, check_signal_handler will print out Warning for SHURDOWN2_SIGNAL (SIGINT) which is replaced by non-interactive shell. Fix by supply more information of the replacement to user. Reviewed-by: acorn, dsamersoff
This commit is contained in:
parent
2655375438
commit
f2fbd2207d
@ -3741,6 +3741,11 @@ void os::Aix::check_signal_handler(int sig) {
|
||||
tty->print_cr(" found:%s", get_signal_handler_name(thisHandler, buf, O_BUFLEN));
|
||||
// No need to check this sig any longer
|
||||
sigaddset(&check_signal_done, sig);
|
||||
// Running under non-interactive shell, SHUTDOWN2_SIGNAL will be reassigned SIG_IGN
|
||||
if (sig == SHUTDOWN2_SIGNAL && !isatty(fileno(stdin))) {
|
||||
tty->print_cr("Running in non-interactive shell, %s handler is replaced by shell",
|
||||
exception_name(sig, buf, O_BUFLEN));
|
||||
}
|
||||
} else if (os::Aix::get_our_sigflags(sig) != 0 && (int)act.sa_flags != os::Aix::get_our_sigflags(sig)) {
|
||||
tty->print("Warning: %s handler flags ", exception_name(sig, buf, O_BUFLEN));
|
||||
tty->print("expected:" PTR32_FORMAT, os::Aix::get_our_sigflags(sig));
|
||||
|
@ -3374,6 +3374,11 @@ void os::Bsd::check_signal_handler(int sig) {
|
||||
tty->print_cr(" found:%s", get_signal_handler_name(thisHandler, buf, O_BUFLEN));
|
||||
// No need to check this sig any longer
|
||||
sigaddset(&check_signal_done, sig);
|
||||
// Running under non-interactive shell, SHUTDOWN2_SIGNAL will be reassigned SIG_IGN
|
||||
if (sig == SHUTDOWN2_SIGNAL && !isatty(fileno(stdin))) {
|
||||
tty->print_cr("Running in non-interactive shell, %s handler is replaced by shell",
|
||||
exception_name(sig, buf, O_BUFLEN));
|
||||
}
|
||||
} else if(os::Bsd::get_our_sigflags(sig) != 0 && (int)act.sa_flags != os::Bsd::get_our_sigflags(sig)) {
|
||||
tty->print("Warning: %s handler flags ", exception_name(sig, buf, O_BUFLEN));
|
||||
tty->print("expected:" PTR32_FORMAT, os::Bsd::get_our_sigflags(sig));
|
||||
|
@ -4560,6 +4560,11 @@ void os::Linux::check_signal_handler(int sig) {
|
||||
tty->print_cr(" found:%s", get_signal_handler_name(thisHandler, buf, O_BUFLEN));
|
||||
// No need to check this sig any longer
|
||||
sigaddset(&check_signal_done, sig);
|
||||
// Running under non-interactive shell, SHUTDOWN2_SIGNAL will be reassigned SIG_IGN
|
||||
if (sig == SHUTDOWN2_SIGNAL && !isatty(fileno(stdin))) {
|
||||
tty->print_cr("Running in non-interactive shell, %s handler is replaced by shell",
|
||||
exception_name(sig, buf, O_BUFLEN));
|
||||
}
|
||||
} else if(os::Linux::get_our_sigflags(sig) != 0 && (int)act.sa_flags != os::Linux::get_our_sigflags(sig)) {
|
||||
tty->print("Warning: %s handler flags ", exception_name(sig, buf, O_BUFLEN));
|
||||
tty->print("expected:" PTR32_FORMAT, os::Linux::get_our_sigflags(sig));
|
||||
|
@ -4418,6 +4418,11 @@ void os::Solaris::check_signal_handler(int sig) {
|
||||
tty->print_cr(" found:%s", get_signal_handler_name(thisHandler, buf, O_BUFLEN));
|
||||
// No need to check this sig any longer
|
||||
sigaddset(&check_signal_done, sig);
|
||||
// Running under non-interactive shell, SHUTDOWN2_SIGNAL will be reassigned SIG_IGN
|
||||
if (sig == SHUTDOWN2_SIGNAL && !isatty(fileno(stdin))) {
|
||||
tty->print_cr("Running in non-interactive shell, %s handler is replaced by shell",
|
||||
exception_name(sig, buf, O_BUFLEN));
|
||||
}
|
||||
} else if(os::Solaris::get_our_sigflags(sig) != 0 && act.sa_flags != os::Solaris::get_our_sigflags(sig)) {
|
||||
tty->print("Warning: %s handler flags ", exception_name(sig, buf, O_BUFLEN));
|
||||
tty->print("expected:" PTR32_FORMAT, os::Solaris::get_our_sigflags(sig));
|
||||
|
Loading…
x
Reference in New Issue
Block a user