Mercurial > hg > graal-jvmci-8
comparison src/os/bsd/vm/os_bsd.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 |
comparison
equal
deleted
inserted
replaced
23011:1e96e4389302 | 23020:bbceafdc7a5f |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * | 4 * |
5 * This code is free software; you can redistribute it and/or modify it | 5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as | 6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
3549 tty->print("Warning: %s handler ", exception_name(sig, buf, O_BUFLEN)); | 3549 tty->print("Warning: %s handler ", exception_name(sig, buf, O_BUFLEN)); |
3550 tty->print("expected:%s", get_signal_handler_name(jvmHandler, buf, O_BUFLEN)); | 3550 tty->print("expected:%s", get_signal_handler_name(jvmHandler, buf, O_BUFLEN)); |
3551 tty->print_cr(" found:%s", get_signal_handler_name(thisHandler, buf, O_BUFLEN)); | 3551 tty->print_cr(" found:%s", get_signal_handler_name(thisHandler, buf, O_BUFLEN)); |
3552 // No need to check this sig any longer | 3552 // No need to check this sig any longer |
3553 sigaddset(&check_signal_done, sig); | 3553 sigaddset(&check_signal_done, sig); |
3554 // Running under non-interactive shell, SHUTDOWN2_SIGNAL will be reassigned SIG_IGN | |
3555 if (sig == SHUTDOWN2_SIGNAL && !isatty(fileno(stdin))) { | |
3556 tty->print_cr("Running in non-interactive shell, %s handler is replaced by shell", | |
3557 exception_name(sig, buf, O_BUFLEN)); | |
3558 } | |
3554 } else if(os::Bsd::get_our_sigflags(sig) != 0 && (int)act.sa_flags != os::Bsd::get_our_sigflags(sig)) { | 3559 } else if(os::Bsd::get_our_sigflags(sig) != 0 && (int)act.sa_flags != os::Bsd::get_our_sigflags(sig)) { |
3555 tty->print("Warning: %s handler flags ", exception_name(sig, buf, O_BUFLEN)); | 3560 tty->print("Warning: %s handler flags ", exception_name(sig, buf, O_BUFLEN)); |
3556 tty->print("expected:" PTR32_FORMAT, os::Bsd::get_our_sigflags(sig)); | 3561 tty->print("expected:" PTR32_FORMAT, os::Bsd::get_our_sigflags(sig)); |
3557 tty->print_cr(" found:" PTR32_FORMAT, act.sa_flags); | 3562 tty->print_cr(" found:" PTR32_FORMAT, act.sa_flags); |
3558 // No need to check this sig any longer | 3563 // No need to check this sig any longer |