Mercurial > hg > graal-jvmci-8
diff 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 |
line wrap: on
line diff
--- a/src/os/linux/vm/os_linux.cpp Thu May 07 19:37:47 2015 -0700 +++ b/src/os/linux/vm/os_linux.cpp Thu May 14 20:56:57 2015 -0700 @@ -4635,6 +4635,11 @@ 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));