hotspot/src/os/bsd/vm/os_bsd.cpp
changeset 23444 b5457261694b
parent 22894 870fbe165d06
child 23522 217a6a90aad3
--- a/hotspot/src/os/bsd/vm/os_bsd.cpp	Fri Mar 14 12:02:54 2014 +0000
+++ b/hotspot/src/os/bsd/vm/os_bsd.cpp	Fri Mar 14 14:17:11 2014 -0700
@@ -3374,6 +3374,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::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));