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
SIGBUSTerminate (core dump)Access to an undefined portion of a memory object
SIGCHLDIgnoreChild process terminated, stopped, or continued
SIGCONTContinueContinue 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
SIGPOLLTerminatePollable event
SIGPROFTerminateProfiling timer expired
SIGQUIT3Terminate (core dump)Terminal quit signal
SIGSEGV11Terminate (core dump)Invalid memory reference
SIGSTOPStopStop executing (cannot be caught or ignored)
SIGSYSTerminate (core dump)Bad system call
SIGTERM15TerminateTermination signal
SIGTRAP5Terminate (core dump)Trace/breakpoint trap
SIGTSTPStopTerminal stop signal
SIGTTINStopBackground process attempting read
SIGTTOUStopBackground process attempting write
SIGUSR1TerminateUser-defined signal 1
SIGUSR2TerminateUser-defined signal 2
SIGURGIgnoreOut-of-band data is available at a socket
SIGVTALRMTerminateVirtual timer expired
SIGXCPUTerminate (core dump)CPU time limit exceeded
SIGXFSZTerminate (core dump)File size limit exceeded
SIGWINCHIgnoreTerminal 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