Signals are generally used in UNIX-like systems for performing IPC actions.

C Standard Signals

  • SIGABRT (Abort)
  • SIGFPE (Floating point exception)
  • SIGILL (Illegal instruction)
  • SIGINT (Interrupt)
  • SIGSEGV (Segmentation violation, due to invalid memory access)
  • SIGTERM (Terminate a program)

UNIX POSIX/SUS Standard Signals

NOTE

  • Different signals are defined for software to use them in the way they want, but if they don’t make use of them, they fall back to the default action
  • Signal numbers are usually left to implementations, but POSIX standard defines numbers for a few signals
SignalSignal NumberDefault ActionDescription
SIGABRT6Terminate (core dump)Process abort signal
SIGALRM14TerminateAlarm clock
SIGBUS—Terminate (core dump)Access to an undefined portion of a memory object
SIGCHLD—IgnoreChild process terminated, stopped, or continued
SIGCONT—ContinueContinue executing, if stopped
SIGFPE8Terminate (core dump)Erroneous arithmetic operation
SIGHUP1TerminateHangup
SIGILL4Terminate (core dump)Illegal instruction
SIGINT2TerminateTerminal interrupt signal
SIGKILL9TerminateKill (cannot be caught or ignored)
SIGPIPE13TerminateWrite on a pipe with no one to read it
SIGPOLL—TerminatePollable event
SIGPROF—TerminateProfiling timer expired
SIGQUIT3Terminate (core dump)Terminal quit signal
SIGSEGV11Terminate (core dump)Invalid memory reference
SIGSTOP—StopStop executing (cannot be caught or ignored)
SIGSYS—Terminate (core dump)Bad system call
SIGTERM15TerminateTermination signal
SIGTRAP5Terminate (core dump)Trace/breakpoint trap
SIGTSTP—StopTerminal stop signal
SIGTTIN—StopBackground process attempting read
SIGTTOU—StopBackground process attempting write
SIGUSR1—TerminateUser-defined signal 1
SIGUSR2—TerminateUser-defined signal 2
SIGURG—IgnoreOut-of-band data is available at a socket
SIGVTALRM—TerminateVirtual timer expired
SIGXCPU—Terminate (core dump)CPU time limit exceeded
SIGXFSZ—Terminate (core dump)File size limit exceeded
SIGWINCH—IgnoreTerminal window size changed

Miscellaneous Signals

These signals aren’t defined by POSIX, but are used in some systems.

  • SIGEMT
  • SIGINFO
  • SIGPWR
  • SIGLOST
  • SIGSTKFLT
  • SIGUNUSED
  • SIGCLD