Signal 정리

Linux 2018. 1. 8. 17:37

Signal 발생 방법


$ kill [-signalID] PID


15번까지는 공통이고 16번 부터는 시스템별로 다를 수 있다.


 1 : SIGHUP  ( HUP) - 연결 끊기. 프로세스 설정파일 다시 읽는데 사용
 2 : SIGINT  ( INT) - 인터럽트
 3 : SIGQUIT (QUIT) - 종료
 4 : SIGILL  ( ILL) - 잘못된 명령
 5 : SIGTRAP (TRAP) - 트렙추적
 6 : SIGIOT  ( IOT) - IOT명령
 7 : SIGBUS  ( BUS) - 버스에러
 8 : SIGFPE  ( FPE) - 고정소수점예외
 9 : SIGKILL (KILL) - 죽이기. 시그널은 잡히지 않는다.
10 : SIGUSR1 (USR1) - 사용자 정의 시그널1
11 : SIGSEGV (SEGV) - 세그먼테이션 위반
12 : SIGUSR2 (USR2) - 사용자 정의 시그널2
13 : SIGPIPE (PIPE) - 읽을 것이 없는 파이프에 대한 시그널
14 : SIGALRM (ALRM) - 경고 클럭
15 : SIGTERM (TERM) - 소프트웨어 종료 시그널. 일반적인 KILL 시그널이기 때문에 종료되는 것을 트랙 할 수 있다.
16 : SIGKFLT        - 코프로세서 스택 실패
17 : SIGCHLD (CHLD) - 자식 프로세스의 상태변화
18 : SIGCONT (CONT) - STOP 시그널 이후 계속 진행할 때 사용
19 : SIGSTOP (STOP) - 정지. 이 시그널 역시 잡을 수 없다.
20 : SIGTSTP (TSTP) - 키보드에 의해 발생하는 시그널로 Ctrl+Z로 생성


1. SIGHUP: 연결된terminal이hangup하였을때(terminate)
2. SIGINT: interrupt key(^C)를입력하였을때(terminate)
3. SIGQUIT: quit key(^\)를입력하였을때(terminate+core)
4. SIGILL: illegal instruction을수행하였을때(terminate+core)
5. SIGTRAP: implementation defined hardware fault (terminate+core)
6. SIGABRT: abort시스템호출을불렀을때(terminate+core)
7. SIGBUS: implementation defined hardware fault (terminate+core)
8. SIGFPE: arithmetic exception, /0, floating-point overflow (terminate+core)
9. SIGKILL: process를kill하기위핚signal, catch 혹은ignore될수없는signal임(terminate)
10. SIGUSR1: user defined signal 1 (terminate)
11. SIGSEGV: invalid memory reference (terminate+core)
12. SIGUSR2: user defined signal 2 (terminate)
13. SIGPIPE: reader가terminate된pipe에write핚경우발생(terminate)
14. SIGALRM: alarm시스템호출후timer가expire된경우(terminate)
15. SIGTERM: kill시스템호출이보내는software termination signal (terminate)
16. SIGCHLD: child가stop or exit되었을때parent에게전달되는신호(ignore)
17. SIGCONT: continue a stopped process (continue/ignore)
18. SIGSTOP: sendable stop signal, cannot be caught or ignored (stop process)
19. SIGTSTP: stop key(^Z)를입력하였을때(stop process)
20. SIGTTIN: background process가control tty로부터read핛경우(stop process)
21. SIGTTOU: background process가control tty로write핛경우(stop process)
22. SIGURG: urgent condition on IO, socket의OOB data (ignore)
23. SIGXCPU: exceeded CPU time limit (terminate+core/ignore)
24. SIGXFSZ: exceeded file size limit (terminate+core/ignore)
25. SIGVTALRM: virtual time alarm, setitimer, (terminate)
26. SIGPROF: profiling time alarm, setitimer, (terminate)
27. SIGWINCH: terminal window size changed, (ignore)
28. SIGIO: 어떤fd에서asynchronous I/O event가발생하였을경우(terminate/ignore)
29. SIGPWR: system power fail (terminate/ignore)
30. SIGSYS: bad argument to system call (terminate+core)

'Linux' 카테고리의 다른 글

동영상 포맷변경  (0) 2018.02.07
개발자 환경 구성?  (0) 2017.12.24
Linux에서 시간 동기화하기  (0) 2017.12.21
Systemd을 이용한 서비스 등록방법  (0) 2017.12.08
Local 컴퓨터에서 비밀번호를 잊어버렸을 때  (0) 2017.08.04
Posted by codebank
,