2.2 시그널
2.2.1 스탠다드 시그널
Signal |
Value |
Action |
Comment |
SIGHUP |
1 |
Term |
Hangup detected on controlling terminal or death of controlling process |
SIGINT |
2 |
Term |
Interrupt from keyboard |
SIGQUIT |
3 |
Core |
Quit from keyboard |
SIGILL |
4 |
Core |
Illegal Instruction |
SIGABRT |
6 |
Core |
Abort signal from abort(3) |
SIGFPE |
8 |
Core |
Floating-point exception |
SIFKILL * |
9 |
Term |
Kill signal |
SIGSEGV |
11 |
Core |
Invalid memory reference |
SIGPIPE |
13 |
Term |
Broken pipe: write to pipe with no readers; see pipe(7) |
SIGALRM | 14 | Term | Timer signal from alarm(2) |
SIGTERM | 15 | Term | Termination signal |
SIGUSR1 | 30, 10, 16 | Term | User-defined signal 1 |
SIGUSR2 | 31, 12, 17 | Term | User-defined signal 2 |
SIGCHLD | 20, 17, 18 | Ign | Child stopped or terminated |
SIGCONT | 19, 18, 25 | Cont | Continue if stopped |
SIGSTOP * | 17, 19, 23 | Stop | Stop process |
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 |
*The signals SIGKILL and SIGSTOP cannot be caught, blocked, or ignored.
Term Default action is to terminate the process.
Ign Default action is to ignore the signal.
Core Default action is to terminate the process and dump core.
Stop Default action is to stop the process.
Cont Default action is to continue the process if it is currently stopped.
나머지 시그널 정보는 Linux Programmar's Manual 참고
2.2.2 시그널 함수
typdef void (*sighandler_t)(int);
sighandler_t signal(int signum, sighandler_t handler);
int kill(pid_t pid, int sig);
unsigned int alarm(unsigned int seconds)
int pause(void);
'한국으로 > 임베디드 리눅스' 카테고리의 다른 글
3.4 메시지 큐 (0) | 2018.06.27 |
---|---|
3.3 공유 메모리 (0) | 2018.06.27 |
3.2 세마포어 (0) | 2018.06.27 |
3.1 파이프 (0) | 2018.06.27 |
2.1 프로세스 (0) | 2018.06.27 |
1.6 파일 입출력 (0) | 2018.06.27 |
1.5 응용 프로그램 (0) | 2018.06.26 |
1.4 개발환경 구축 (0) | 2018.06.26 |