How the JVM processes signals
When a signal is raised that is of interest to the JVM, a signal handler is called. This signal handler determines whether it has been called for a Java or non-Java thread. If the signal is for a Java thread, the JVM takes control of the signal handling. If the signal is for a non-Java thread, and the application that installed the JVM had previously installed its own handler for the signal, control is given to that handler. Otherwise, the signal is ignored (whether or not this is not the signal's default action).
For exception and error signals the JVM either:
- Handles the condition and recovers (when the exception is caused by your application code), or
- Enters a controlled shutdown sequence where it:
- Calls your application's signal handler for that signal
- Outputs a Javadump, to describe the JVM state at the point of failure
- Performs the necessary cleanup to give a clean shutdown
For interrupt signals, the JVM also enters a controlled shutdown sequence, but this time it is treated as a normal termination that:
- Calls your application's signal handler for that signal
- Performs the necessary JVM cleanup
The shutdown is identical to the shutdown initiated by a call to the Java method System.exit().
Other signals that are used by the JVM are for internal control purposes and do not cause it to terminate. The only control signal of interest is SIGQUIT, which causes a Javadump to be generated.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26651/viewspace-751659/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Signals used by the JVMJVM
- The underlying JVM is how to realize the synchronizedJVMsynchronized
- How To Retry Multiple Errored Approval Workflow Processes After A Fix Or Patch Has Been ImplementedErrorAPP
- db_writer_processes-log_archive_max_processesHive
- 程式(Processes)
- Flask訊號機制(signals)Flask
- SESSIONS, PROCESSES, TRANSACTIONSSession
- Sessions & Processes parameterSession
- Signals-The Boost C++ LibrariesC++
- Oracle RAC Background processesOracle
- Dedicated and Shared Server ProcessesServer
- 增加連線數processes
- Connection/Session/Server ProcessesSessionServer
- The Oracle Background Processes for Sybase ProsOracleROS
- Types of Processes (108)
- Server Processes (112)Server
- 37 Signals的實用最小主義實踐
- sessions,processes的監控方法Session
- New Background Processes In 10g
- Overview of User Processes (109)View
- Overview of Oracle Processes (111)ViewOracle
- Queue Monitor Processes (QMNn) (125)
- 從釋出-訂閱模式談談 Flask 的 Signals模式Flask
- Shared Server Processes (Snnn) (131)Server
- Linux程式設計入門 fork/pthread/signals(轉)Linux程式設計thread
- Systematic index design consists of two processesIndex
- nginx學習隨筆--worker_processesNginx
- [HP-UX] cannot fork: too many processesUX
- oracle中的processes,session,transaction引數OracleSession
- DBWR_IO_SLAVES & db_writer_processes
- sessions 與 processes 的計算關係Session
- You want to use parallel processes for a client copy.Parallelclient
- How to Find Out How Much Space an Index is UsingIndex
- oracle 11.2 所有Background Processes 的功能描述Oracle
- linux動態修改 max user processes limitsLinuxMIT
- Android Guide Dev 之Processes and ThreadsAndroidGUIIDEdevthread
- job_queue_processes引數 job關係
- DIFFERENCES BETWEEN PROCESSES, SESSIONS AND CONNECTIONS(asktom)Session