src/os/bsd/vm/jvm_bsd.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File
*** old/src/os/linux/vm/jvm_linux.cpp	Tue Sep 13 12:29:49 2011
--- new/src/os/bsd/vm/jvm_bsd.cpp	Tue Sep 13 12:29:49 2011

*** 71,81 **** --- 71,81 ---- case SHUTDOWN1_SIGNAL: case SHUTDOWN2_SIGNAL: case SHUTDOWN3_SIGNAL: if (ReduceSignalUsage) return (void*)-1; ! if (os::Linux::is_sig_ignored(sig)) return (void*)1; ! if (os::Bsd::is_sig_ignored(sig)) return (void*)1; } void* oldHandler = os::signal(sig, newHandler); if (oldHandler == os::user_handler()) { return (void *)2;
*** 95,105 **** --- 95,105 ---- sig == SHUTDOWN3_SIGNAL || sig == BREAK_SIGNAL) { return JNI_FALSE; } } else if ((sig == SHUTDOWN1_SIGNAL || sig == SHUTDOWN2_SIGNAL || ! sig == SHUTDOWN3_SIGNAL) && os::Linux::is_sig_ignored(sig)) { ! sig == SHUTDOWN3_SIGNAL) && os::Bsd::is_sig_ignored(sig)) { // do not allow SHUTDOWN1_SIGNAL to be raised when SHUTDOWN1_SIGNAL // is ignored, since no handler for them is actually registered in JVM // or via JVM_RegisterSignal. // This also applies for SHUTDOWN2_SIGNAL and SHUTDOWN3_SIGNAL return JNI_FALSE;
*** 108,125 **** --- 108,125 ---- os::signal_raise(sig); return JNI_TRUE; JVM_END /* ! All the defined signal names for Linux. ! All the defined signal names for Bsd. NOTE that not all of these names are accepted by our Java implementation Via an existing claim by the VM, sigaction restrictions, or the "rules of Unix" some of these names will be rejected at runtime. For example the VM sets up to handle USR1, sigaction returns EINVAL for ! STOP, and Linux simply doesn't allow catching of KILL. ! STOP, and Bsd simply doesn't allow catching of KILL. Here are the names currently accepted by a user of sun.misc.Signal with 1.4.1 (ignoring potential interaction with use of chaining, etc): HUP, INT, TRAP, ABRT, IOT, BUS, USR2, PIPE, ALRM, TERM, STKFLT,
*** 139,180 **** --- 139,173 ---- "INT", SIGINT, /* Interrupt (ANSI). */ "QUIT", SIGQUIT, /* Quit (POSIX). */ "ILL", SIGILL, /* Illegal instruction (ANSI). */ "TRAP", SIGTRAP, /* Trace trap (POSIX). */ "ABRT", SIGABRT, /* Abort (ANSI). */ ! "IOT", SIGIOT, /* IOT trap (4.2 BSD). */ "BUS", SIGBUS, /* BUS error (4.2 BSD). */ ! "EMT", SIGEMT, /* EMT trap */ "FPE", SIGFPE, /* Floating-point exception (ANSI). */ "KILL", SIGKILL, /* Kill, unblockable (POSIX). */ ! "USR1", SIGUSR1, /* User-defined signal 1 (POSIX). */ ! "BUS", SIGBUS, /* BUS error (4.2 BSD). */ "SEGV", SIGSEGV, /* Segmentation violation (ANSI). */ ! "USR2", SIGUSR2, /* User-defined signal 2 (POSIX). */ ! "SYS", SIGSYS, /* Bad system call. Only on some Bsden! */ "PIPE", SIGPIPE, /* Broken pipe (POSIX). */ "ALRM", SIGALRM, /* Alarm clock (POSIX). */ "TERM", SIGTERM, /* Termination (ANSI). */ #ifdef SIGSTKFLT "STKFLT", SIGSTKFLT, /* Stack fault. */ #endif "CLD", SIGCLD, /* Same as SIGCHLD (System V). */ "CHLD", SIGCHLD, /* Child status has changed (POSIX). */ "CONT", SIGCONT, /* Continue (POSIX). */ + "URG", SIGURG, /* Urgent condition on socket (4.2 BSD). */ "STOP", SIGSTOP, /* Stop, unblockable (POSIX). */ "TSTP", SIGTSTP, /* Keyboard stop (POSIX). */ + "CONT", SIGCONT, /* Continue (POSIX). */ + "CHLD", SIGCHLD, /* Child status has changed (POSIX). */ "TTIN", SIGTTIN, /* Background read from tty (POSIX). */ "TTOU", SIGTTOU, /* Background write to tty (POSIX). */ ! "URG", SIGURG, /* Urgent condition on socket (4.2 BSD). */ ! "IO", SIGIO, /* I/O now possible (4.2 BSD). */ "XCPU", SIGXCPU, /* CPU limit exceeded (4.2 BSD). */ "XFSZ", SIGXFSZ, /* File size limit exceeded (4.2 BSD). */ "VTALRM", SIGVTALRM, /* Virtual alarm clock (4.2 BSD). */ "PROF", SIGPROF, /* Profiling alarm clock (4.2 BSD). */ "WINCH", SIGWINCH, /* Window size change (4.3 BSD, Sun). */ ! "POLL", SIGPOLL, /* Pollable event occurred (System V). */ ! "IO", SIGIO, /* I/O now possible (4.2 BSD). */ ! "PWR", SIGPWR, /* Power failure restart (System V). */ #ifdef SIGSYS "SYS", SIGSYS /* Bad system call. Only on some Linuxen! */ #endif ! "INFO", SIGINFO, /* Information request. */ ! "USR1", SIGUSR1, /* User-defined signal 1 (POSIX). */ ! "USR2", SIGUSR2 /* User-defined signal 2 (POSIX). */ }; JVM_ENTRY_NO_ENV(jint, JVM_FindSignal(const char *name)) /* find and return the named signal's number */

src/os/bsd/vm/jvm_bsd.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File