3418 tty->print_cr("Running in non-interactive shell, %s handler is replaced by shell",
3419 exception_name(sig, buf, O_BUFLEN));
3420 }
3421 } else if(os::Bsd::get_our_sigflags(sig) != 0 && (int)act.sa_flags != os::Bsd::get_our_sigflags(sig)) {
3422 tty->print("Warning: %s handler flags ", exception_name(sig, buf, O_BUFLEN));
3423 tty->print("expected:" PTR32_FORMAT, os::Bsd::get_our_sigflags(sig));
3424 tty->print_cr(" found:" PTR32_FORMAT, act.sa_flags);
3425 // No need to check this sig any longer
3426 sigaddset(&check_signal_done, sig);
3427 }
3428
3429 // Dump all the signal
3430 if (sigismember(&check_signal_done, sig)) {
3431 print_signal_handlers(tty, buf, O_BUFLEN);
3432 }
3433 }
3434
3435 extern void report_error(char* file_name, int line_no, char* title,
3436 char* format, ...);
3437
3438 extern bool signal_name(int signo, char* buf, size_t len);
3439
3440 const char* os::exception_name(int exception_code, char* buf, size_t size) {
3441 if (0 < exception_code && exception_code <= SIGRTMAX) {
3442 // signal
3443 if (!signal_name(exception_code, buf, size)) {
3444 jio_snprintf(buf, size, "SIG%d", exception_code);
3445 }
3446 return buf;
3447 } else {
3448 return NULL;
3449 }
3450 }
3451
3452 // this is called _before_ the most of global arguments have been parsed
3453 void os::init(void) {
3454 char dummy; // used to get a guess on initial stack address
3455 // first_hrtime = gethrtime();
3456
3457 // With BsdThreads the JavaMain thread pid (primordial thread)
3458 // is different than the pid of the java launcher thread.
3459 // So, on Bsd, the launcher thread pid is passed to the VM
3460 // via the sun.java.launcher.pid property.
3461 // Use this property instead of getpid() if it was correctly passed.
3462 // See bug 6351349.
3463 pid_t java_launcher_pid = (pid_t) Arguments::sun_java_launcher_pid();
3464
3465 _initial_pid = (java_launcher_pid > 0) ? java_launcher_pid : getpid();
3466
3467 clock_tics_per_sec = CLK_TCK;
3468
3469 init_random(1234567);
3470
3471 ThreadCritical::initialize();
|
3418 tty->print_cr("Running in non-interactive shell, %s handler is replaced by shell",
3419 exception_name(sig, buf, O_BUFLEN));
3420 }
3421 } else if(os::Bsd::get_our_sigflags(sig) != 0 && (int)act.sa_flags != os::Bsd::get_our_sigflags(sig)) {
3422 tty->print("Warning: %s handler flags ", exception_name(sig, buf, O_BUFLEN));
3423 tty->print("expected:" PTR32_FORMAT, os::Bsd::get_our_sigflags(sig));
3424 tty->print_cr(" found:" PTR32_FORMAT, act.sa_flags);
3425 // No need to check this sig any longer
3426 sigaddset(&check_signal_done, sig);
3427 }
3428
3429 // Dump all the signal
3430 if (sigismember(&check_signal_done, sig)) {
3431 print_signal_handlers(tty, buf, O_BUFLEN);
3432 }
3433 }
3434
3435 extern void report_error(char* file_name, int line_no, char* title,
3436 char* format, ...);
3437
3438 // this is called _before_ the most of global arguments have been parsed
3439 void os::init(void) {
3440 char dummy; // used to get a guess on initial stack address
3441 // first_hrtime = gethrtime();
3442
3443 // With BsdThreads the JavaMain thread pid (primordial thread)
3444 // is different than the pid of the java launcher thread.
3445 // So, on Bsd, the launcher thread pid is passed to the VM
3446 // via the sun.java.launcher.pid property.
3447 // Use this property instead of getpid() if it was correctly passed.
3448 // See bug 6351349.
3449 pid_t java_launcher_pid = (pid_t) Arguments::sun_java_launcher_pid();
3450
3451 _initial_pid = (java_launcher_pid > 0) ? java_launcher_pid : getpid();
3452
3453 clock_tics_per_sec = CLK_TCK;
3454
3455 init_random(1234567);
3456
3457 ThreadCritical::initialize();
|