Unix 訊號定義

在 unix 中的每個信號號都有對應的定義,決定了當進程接收到信號時的行為。下面表格中的 Action 列條目指定了每個信號的默認處置。

  • Ign:Default action is to ignore the signal.
  • Core:Default action is to terminate the process and dump core (see core(5)).
  • Stop:Default action is to stop the process.
  • Cont:Default action is to continue the process if it is currently stopped.

Refencers

https://man7.org/linux/man-pages/man7/signal.7.html

Standard signals

SignalStandardActionComment
SIGABRTP1990CoreAbort signal from abort(3)
SIGALRMP1990TermTimer signal from alarm(2)
SIGBUSP2001CoreBus error (bad memory access)
SIGCHLDP1990IgnChild stopped or terminated
SIGCLD-IgnA synonym for SIGCHLD
SIGCONTP1990ContContinue if stopped
SIGEMT-TermEmulator trap
SIGFPEP1990CoreErroneous arithmetic operation
SIGHUPP1990TermHangup detected on controlling terminal
or death of controlling process
SIGILLP1990CoreIllegal Instruction
SIGINFO-A synonym for SIGPWR
SIGINTP1990TermInterrupt from keyboard
SIGIO-TermI/O now possible (4.2BSD)
SIGIOT-CoreIOT trap. A synonym for SIGABRT
SIGKILLP1990TermKill signal
SIGLOST-TermFile lock lost (unused)
SIGPIPEP1990TermBroken pipe: write to pipe with no
readers; see pipe(7)
SIGPOLLP2001TermPollable event (Sys V);
synonym for SIGIO
SIGPROFP2001TermProfiling timer expired
SIGPWR-TermPower failure (System V)
SIGQUITP1990CoreQuit from keyboard
SIGSEGVP1990CoreInvalid memory reference
SIGSTKFLT-TermStack fault on coprocessor (unused)
SIGSTOPP1990StopStop process
SIGTSTPP1990StopStop typed at terminal
SIGSYSP2001CoreBad system call (SVr4);
see also seccomp(2)
SIGTERMP1990TermTermination signal
SIGTRAPP2001CoreTrace/breakpoint trap
SIGTTINP1990StopTerminal input for background process
SIGTTOUP1990StopTerminal output for background process
SIGUNUSED-CoreSynonymous with SIGSYS
SIGURGP2001IgnUrgent condition on socket (4.2BSD)
SIGUSR1P1990TermUser-defined signal 1
SIGUSR2P1990TermUser-defined signal 2
SIGVTALRMP2001TermVirtual alarm clock (4.2BSD)
SIGXCPUP2001CoreCPU time limit exceeded (4.2BSD);
see setrlimit(2)
SIGXFSZP2001CoreFile size limit exceeded (4.2BSD);
see setrlimit(2)
SIGWINCH-IgnWindow resize signal (4.3BSD, Sun)
comments powered by Disqus