Signal: Difference between revisions
Jump to navigation
Jump to search
Line 15: | Line 15: | ||
{| class="wikitable sortable" | {| class="wikitable sortable" | ||
|- | |- | ||
! Signal !! data-sort-type="number"| | ! Signal !! data-sort-type="number"|Alpha/Sparc !! data-sort-type="number"|X86/ARM/Others !! data-sort-type="number"|Mips !! Default Action !! class="unsortable"|Description | ||
|- | |- | ||
| SIGABRT || 6 || Core || Abort signal from abort(3). | | SIGABRT || 6 || 6 || 6 || Core || Abort signal from abort(3). | ||
|- | |- | ||
| SIGALRM || 14 || Term || Timer signal from alarm(2). | | SIGALRM || 14 || 14 || 14 || Term || Timer signal from alarm(2). | ||
|- | |- | ||
| SIGBUS || 10 | | SIGBUS || 10 || 7 || 10 || Core || Bus error(bad memory access). | ||
|- | |- | ||
| SIGCHLD || 20 | | SIGCHLD || 20 || 17 || 18 || Ign || Child stopped or terminated. | ||
|- | |- | ||
| SIGCONT || 19 | | SIGCONT || 19 || 18 || 25 || Cont || Continue if stopped. | ||
|- | |- | ||
| SIGFPE || 8 || Core || Floating point exception. | | SIGFPE || 8 || 8 || 8 || Core || Floating point exception. | ||
|- | |- | ||
| SIGHUP || 1 || Term || Hangup detected on controlling terminal or death of controlling process. | | SIGHUP || 1 || 1 || 1 || Term || Hangup detected on controlling terminal or death of controlling process. | ||
|- | |- | ||
| SIGILL || 4 || Core || Illegal instruction. | | SIGILL || 4 || 4 || 4 || Core || Illegal instruction. | ||
|- | |- | ||
| SIGINT || 2 || Term || Interrupt from keyboard | | SIGINT || 2 || 2 || 2 || Term || Interrupt from keyboard | ||
|- | |- | ||
| SIGKILL || 9 || Term || Kill signal | | SIGKILL || 9 || 9 || 9 || Term || Kill signal | ||
|- | |- | ||
| SIGPIPE || 13 || Term || Broken pipe: write to pipe with no readers. | | SIGPIPE || 13 || 13 || 13 || Term || Broken pipe: write to pipe with no readers. | ||
|- | |- | ||
| SIGPOLL || || Term || Pollable event(Sys V). Synonym for SIGIO. | | SIGPOLL || - || - || - || Term || Pollable event(Sys V). Synonym for SIGIO. | ||
|- | |- | ||
| SIGPROF || 27 | | SIGPROF || 27 || 27 || 29 || Term || Profiling timer expired. | ||
|- | |- | ||
| SIGQUIT || 3 || Core || Quit from keyboard. | | SIGQUIT || 3 || 3 || 3 || Core || Quit from keyboard. | ||
|- | |- | ||
| SIGSEGV || 11 || Core || Invalid memory reference. | | SIGSEGV || 11 || 11 || 11 || Core || Invalid memory reference. | ||
|- | |- | ||
| SIGSTOP || 17 | | SIGSTOP || 17 || 19 || 23 || Stop || Stop process | ||
|- | |- | ||
| SIGSYS || 12 | | SIGSYS || 12 || 31 || 12 || Core || Bad argument to routine(SVr4). | ||
|- | |- | ||
| SIGTERM || 15 || Term || Termination signal. | | SIGTERM || 15 || 15 || 15 || Term || Termination signal. | ||
|- | |- | ||
| SIGTRAP || 5 || Core || Trace/breakpoint trap. | | SIGTRAP || 5 || 5 || 5 || Core || Trace/breakpoint trap. | ||
|- | |- | ||
| SIGTSTP || 18 | | SIGTSTP || 18 || 20 || 24 || Stop || Stop typed at terminal. | ||
|- | |- | ||
| SIGTTIN || 21 | | SIGTTIN || 21 || 21 || 26 || Stop || Terminal input for background process. | ||
|- | |- | ||
| SIGTTOU || 22 | | SIGTTOU || 22 || 22 || 27 || Stop || Terminal output for background process. | ||
|- | |- | ||
| SIGUSR1 || 30 | | SIGUSR1 || 30 || 10 || 16 || Term || User-defined signal 1. | ||
|- | |- | ||
| SIGUSR2 || 31 | | SIGUSR2 || 31 || 12 || 17 || Term || User-defined signal 2. | ||
|- | |- | ||
| SIGURG || 16 | | SIGURG || 16 || 23 || 21 || Ign || Urgent condition on socket(4.2BSD). | ||
|- | |- | ||
| SIGVTALRM || 26 | | SIGVTALRM || 26 || 26 || 28 || Term || Virtual alarm clock(4.2BSD). | ||
|- | |- | ||
| SIGXCPU || 24 | | SIGXCPU || 24 || 24 || 30 || Core || CPU time limit exceeded(4.2BSD). | ||
|- | |- | ||
| SIGXFSZ || 25 | | SIGXFSZ || 25 || 25 || 31 || Core || File size limit exceeded(4.2BSD). | ||
|- | |- | ||
| SIGIOT || 6 || Core || IOT trap. A synonym for SIGABRT. | | SIGIOT || 6 || 6 || 6 || Core || IOT trap. A synonym for SIGABRT. | ||
|- | |- | ||
| SIGEMT || 7 | | SIGEMT || 7 || - || 7 || Term || | ||
|- | |- | ||
| SIGSTKFLT || - | | SIGSTKFLT || - || 16 || - || Term || Stack fault on coprocessor(unused). | ||
|- | |- | ||
| SIGIO || 23 | | SIGIO || 23 || 29 || 22 || Term || I/O now possible(4.2BSD). | ||
|- | |- | ||
| SIGCLD || - | | SIGCLD || - || - || 18 || Ign || A synonym for SIGCHLD | ||
|- | |- | ||
| SIGPWR || 29 | | SIGPWR || 29 || 30 || 19 || Term || Power failure(System V). | ||
|- | |- | ||
| SIGINFO || 29 | | SIGINFO || 29 || - || - || Term || A synonym for SIGPWR. | ||
|- | |- | ||
| SIGLOST || - | | SIGLOST || - || - || - || Term || File lock lost(unused). | ||
|- | |- | ||
| SIGWINCH || 28 | | SIGWINCH || 28 || 28 || 20 || Ign || Window resize signal(4.3BSD, Sun). | ||
|- | |- | ||
| SIGUNUSED || - | | SIGUNUSED || - || 31 || - || Core || Synonymous with SIGSYS. | ||
|} | |} | ||
Revision as of 14:27, 21 April 2016
Overview
Signal 내용 정리
Overview
Signal 내용 정리
Signals
- Term : 프로세스를 종료시킨다. 코어 파일을 생성하지는 않는다.
- Ign : 시그널을 무시한다.
- Core : 프로세스를 종료시키고 코어 파일을 생성한다.
- Stop : 프로세스 동작을 정지시킨다.
- Cont : 정지 상태인 프로세스를 다시 동작 시킨다.
Signal | Alpha/Sparc | X86/ARM/Others | Mips | Default Action | Description |
---|---|---|---|---|---|
SIGABRT | 6 | 6 | 6 | Core | Abort signal from abort(3). |
SIGALRM | 14 | 14 | 14 | Term | Timer signal from alarm(2). |
SIGBUS | 10 | 7 | 10 | Core | Bus error(bad memory access). |
SIGCHLD | 20 | 17 | 18 | Ign | Child stopped or terminated. |
SIGCONT | 19 | 18 | 25 | Cont | Continue if stopped. |
SIGFPE | 8 | 8 | 8 | Core | Floating point exception. |
SIGHUP | 1 | 1 | 1 | Term | Hangup detected on controlling terminal or death of controlling process. |
SIGILL | 4 | 4 | 4 | Core | Illegal instruction. |
SIGINT | 2 | 2 | 2 | Term | Interrupt from keyboard |
SIGKILL | 9 | 9 | 9 | Term | Kill signal |
SIGPIPE | 13 | 13 | 13 | Term | Broken pipe: write to pipe with no readers. |
SIGPOLL | - | - | - | Term | Pollable event(Sys V). Synonym for SIGIO. |
SIGPROF | 27 | 27 | 29 | Term | Profiling timer expired. |
SIGQUIT | 3 | 3 | 3 | Core | Quit from keyboard. |
SIGSEGV | 11 | 11 | 11 | Core | Invalid memory reference. |
SIGSTOP | 17 | 19 | 23 | Stop | Stop process |
SIGSYS | 12 | 31 | 12 | Core | Bad argument to routine(SVr4). |
SIGTERM | 15 | 15 | 15 | Term | Termination signal. |
SIGTRAP | 5 | 5 | 5 | Core | Trace/breakpoint trap. |
SIGTSTP | 18 | 20 | 24 | Stop | Stop typed at terminal. |
SIGTTIN | 21 | 21 | 26 | Stop | Terminal input for background process. |
SIGTTOU | 22 | 22 | 27 | Stop | Terminal output for background process. |
SIGUSR1 | 30 | 10 | 16 | Term | User-defined signal 1. |
SIGUSR2 | 31 | 12 | 17 | Term | User-defined signal 2. |
SIGURG | 16 | 23 | 21 | Ign | Urgent condition on socket(4.2BSD). |
SIGVTALRM | 26 | 26 | 28 | Term | Virtual alarm clock(4.2BSD). |
SIGXCPU | 24 | 24 | 30 | Core | CPU time limit exceeded(4.2BSD). |
SIGXFSZ | 25 | 25 | 31 | Core | File size limit exceeded(4.2BSD). |
SIGIOT | 6 | 6 | 6 | Core | IOT trap. A synonym for SIGABRT. |
SIGEMT | 7 | - | 7 | Term | |
SIGSTKFLT | - | 16 | - | Term | Stack fault on coprocessor(unused). |
SIGIO | 23 | 29 | 22 | Term | I/O now possible(4.2BSD). |
SIGCLD | - | - | 18 | Ign | A synonym for SIGCHLD |
SIGPWR | 29 | 30 | 19 | Term | Power failure(System V). |
SIGINFO | 29 | - | - | Term | A synonym for SIGPWR. |
SIGLOST | - | - | - | Term | File lock lost(unused). |
SIGWINCH | 28 | 28 | 20 | Ign | Window resize signal(4.3BSD, Sun). |
SIGUNUSED | - | 31 | - | Core | Synonymous with SIGSYS. |
SIGHUP
접속된 Terminal 의 연결이 종료될 때 보내지는 signal 이다. 표준은 프로그램 종료이지만, 워낙 예전(표준이 없던 시절)부터 이 Signal 을 달리 처리하던 관습이 있어 많은 프로그램에서 SIGHUP 시그널을 달리 처리하고 있다. 특히 많은 DAEMON 프로그램에서는 설정 파일을 reload 하거나 logfile 을 reopen 하는 방식으로 구현하고 있다.
See also
- https://en.wikipedia.org/wiki/SIGHUP - SIGHUP
SIGHUP
접속된 Terminal 의 연결이 종료될 때 보내지는 signal 이다. 표준은 프로그램 종료이지만, 워낙 예전(표준이 없던 시절)부터 이 Signal 을 달리 처리하던 관습이 있어 많은 프로그램에서 SIGHUP 시그널을 달리 처리하고 있다. 특히 많은 DAEMON 프로그램에서는 설정 파일을 reload 하거나 logfile 을 reopen 하는 방식으로 구현하고 있다.
See also
- https://en.wikipedia.org/wiki/SIGHUP - SIGHUP