아래의 reference를 통해서 java에서 signal을 어떻게 처리하고, 새로운 signal을 등록할 수 있는 예제를 확인하실 수 있습니다.. 좋네요.. ^^
아래는 자바에서 지원되는 시그널과 내용입니다..
Signal Name
Description
SIGSEGV
Incorrect access to memory (write to inaccessible memory)
SIGILL
Illegal instruction (attempt to invoke a unknown machine instruction)
SIGFPE
Floating point exception (divide by zero)
SIGBUS
Bus error (attempt to address nonexistent memory location)
SIGSYS
Bad system call issued
SIGXCPU
CPU time limit exceeded (you've been running too long!)
SIGXFSZ
File size limit exceeded
SIGEMT
EMT instruction (AIX specific)
SIGABRT
Abnormal termination. The JVM raises this signal whenever it detects a JVM fault.
SIGINT
Interactive attention (CTRL-C). JVM will exit normally.
SIGTERM
Termination request. JVM will exit normally.
SIGHUP
Hang up. JVM will exit normally.
SIGUSR1
User defined. Used by some JVMs for internal control purposes.
SIGUSR2
User defined. Used by some JVMs for internal control purposes.
SIGQUIT
A quit signal for a terminal. JVM uses this for taking Java core dumps.
SIGBREAK
A break signal from a terminal. JVM uses this for taking Java core dumps.
SIGTRAP
Internal for use by dbx or ptrace. Used by some JVMs for internal control purposes.
SIGPIPE
A write to a pipe that is not being read. JVM ignores this.
No Name (40)
An AIX reserved signal. Used by the AIX JVM for internal control purposes.
OS별 지원되는 signal에 대한 내용입니다.
E.g. for Unix/Linux based platform the signals are SEGV, ILL, FPE, BUS, SYS, CPU, FSZ, ABRT, INT, TERM, HUP, USR1, QUIT, BREAK, TRAP, PIPE.
For Windows based platform, the signals are SEGV, ILL, FPE, ABRT, INT, TERM, BREAK.
reference
* http://www.ibm.com/developerworks/ibm/library/i-signalhandling/
* http://twit88.com/blog/2008/02/06/java-signal-handling/
* http://mimul.com/pebble/default/2009/07/19/1248007080000.html
'Java' 카테고리의 다른 글
| java server start option recommeded (0) | 2010/07/20 |
|---|---|
| ubuntu(linux) server에서 java 설치하기 (2) | 2010/07/20 |
| java signal handling (0) | 2010/07/16 |
| JDBC Type 별 내용 (0) | 2010/06/25 |
| 외부 API를 JDK에서 내포한 경우, 최신의 외부 API 사용하기.. (0) | 2010/06/22 |