Signals used by the JVM

The following Table below shows the signals that are used by the JVM. The signals have been grouped in the table by type or use, as follows:

  • Exceptions: The operating system synchronously raises an appropriate exception signal whenever a fatal condition occurs.
  • Errors: The JVM raises a SIGABRT if it detects a condition from which it cannot recover.
  • Interrupts: Interrupt signals are raised asynchronously, from outside a JVM process, to request shutdown.
  • Controls: Other signals that are used by the JVM for control purposes.
Table 2. Signals used by the JVM
Signal NameSignal typeDescriptionDisabled by -Xrs
SIGSEGVExceptionIncorrect access to memory (write to inaccessible memory)No
SIGILLExceptionIllegal instruction (attempt to invoke an unknown machine instruction)No
SIGFPEExceptionFloating point exception (divide by zero)No
SIGBUSExceptionBus error (attempt to address nonexistent memory location)Yes
SIGSYSExceptionBad system call issuedYes
SIGXCPUExceptionCPU time limit exceeded (you have been running too long)Yes
SIGXFSZExceptionFile size limit exceededYes
SIGEMTExceptionEMT instruction (AIX specific)Yes
SIGABRTErrorAbnormal termination. The JVM raises this signal whenever it detects a JVM fault.Yes
SIGINTInterruptInteractive attention (CTRL-C). JVM exits normally.Yes
SIGTERMInterruptTermination request. JVM will exit normally.Yes
SIGHUPInterruptHang up. JVM exits normally.Yes
SIGQUITControlA quit signal for a terminal. JVM uses this for taking Javadumps.Yes
SIGTRAPControlInternal for use by DBX or ptrace. Used by some JVMs for internal control purposes.No
SIGPIPEControlA write to a pipe that is not being read. JVM ignores this.No
No Name (40) An AIX reserved signal. Used by the AIX JVM for internal control purposes.No

Use the -Xrs (reduce signal usage) option to prevent the JVM from handling most signals. For more information, see Sun's Java application launcher page athttp://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/java.html.

Do not use the -qflttrap C compiler setting because it provides the possibility of SIGTRAPs being generated, which might then impact the JIT. If you want to have floating point exceptions generated, include this call in your code:

fp_trap( FP_TRAP_SYNC)

so that it generates a SIGFPE signal.

If you install a signal handler for signal numbers 5 (SIGTRAP) or 40, you impact JVM performance because these signals are used for internal control purposes.

Signals 1 (SIGHUP), 2 (SIGINT), 4 (SIGILL), 6 (SIGABRT), 7 (SIGEMT), 8 (SIGFPE), 10 (SIGBUS), 11 (SIGSEGV), 12 (SIGSYS), 15 (SIGTERM), 24 (SIGXCPU) , and 25 (SIGXFSZ) cause the JVM to shut down; therefore, an application signal handler must not attempt to recover from these unless it no longer requires the services of the JVM.

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/26651/viewspace-751660/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/26651/viewspace-751660/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值