comparison src/os/linux/vm/os_linux.cpp @ 23020:bbceafdc7a5f

6536943: Bogus -Xcheck:jni warning for SIG_INT action for SIGINT in JVM started from non-interactive shell Summary: check_signal_handler will print out Warning for SHURDOWN2_SIGNAL (SIGINT) is replaced by non-interactive shell. Fix by supply more information of the replacement to user. Reviewed-by: dholmes Contributed-by: yumin.qi@oracle.com
author minqi
date Thu, 14 May 2015 20:56:57 -0700
parents 9a23a160ca57
children dd9cc155639c 54203a323126
comparison
equal deleted inserted replaced
23011:1e96e4389302 23020:bbceafdc7a5f
4633 tty->print("Warning: %s handler ", exception_name(sig, buf, O_BUFLEN)); 4633 tty->print("Warning: %s handler ", exception_name(sig, buf, O_BUFLEN));
4634 tty->print("expected:%s", get_signal_handler_name(jvmHandler, buf, O_BUFLEN)); 4634 tty->print("expected:%s", get_signal_handler_name(jvmHandler, buf, O_BUFLEN));
4635 tty->print_cr(" found:%s", get_signal_handler_name(thisHandler, buf, O_BUFLEN)); 4635 tty->print_cr(" found:%s", get_signal_handler_name(thisHandler, buf, O_BUFLEN));
4636 // No need to check this sig any longer 4636 // No need to check this sig any longer
4637 sigaddset(&check_signal_done, sig); 4637 sigaddset(&check_signal_done, sig);
4638 // Running under non-interactive shell, SHUTDOWN2_SIGNAL will be reassigned SIG_IGN
4639 if (sig == SHUTDOWN2_SIGNAL && !isatty(fileno(stdin))) {
4640 tty->print_cr("Running in non-interactive shell, %s handler is replaced by shell",
4641 exception_name(sig, buf, O_BUFLEN));
4642 }
4638 } else if(os::Linux::get_our_sigflags(sig) != 0 && (int)act.sa_flags != os::Linux::get_our_sigflags(sig)) { 4643 } else if(os::Linux::get_our_sigflags(sig) != 0 && (int)act.sa_flags != os::Linux::get_our_sigflags(sig)) {
4639 tty->print("Warning: %s handler flags ", exception_name(sig, buf, O_BUFLEN)); 4644 tty->print("Warning: %s handler flags ", exception_name(sig, buf, O_BUFLEN));
4640 tty->print("expected:" PTR32_FORMAT, os::Linux::get_our_sigflags(sig)); 4645 tty->print("expected:" PTR32_FORMAT, os::Linux::get_our_sigflags(sig));
4641 tty->print_cr(" found:" PTR32_FORMAT, act.sa_flags); 4646 tty->print_cr(" found:" PTR32_FORMAT, act.sa_flags);
4642 // No need to check this sig any longer 4647 // No need to check this sig any longer