When a program is executed from the command line (terminal) and there is a runtime error causing the program to seg-fault/coredump where is the runtime error message come from? Is there documentation for this list of runtime error messages? What is "running" the program? Thanks.

P.S. If the answer to the last question is just "The OS", please elaborate if you can.

  • There is no possible "list of messages" WRT a seg fault. There's only one, segmentation fault, a.k.a. SIGSEGV. It has a specific meaning and while potential root causes could be broken into categories, they all result in the same thing. This is a signal delivered to the process by the OS kernel. This can be caught by the process such that it might additionally throw a message of its own, but I don't think that is a common practice.
    – goldilocks
    Jan 23, 2015 at 0:21

1 Answer 1


When a process is terminated by a signal, the shell that spawned it detects the failure and displays the message you’re talking about.  See signal(2), kill(1) and kill(2) for general information about signals, and signal(7) for a list of signals.  See bash(1) (or csh(1), if appropriate) for information on how shells handle signals.  If you’re a glutton for punishment, see wait(2) to see how the shell can determine how a child process died.

Not the answer you're looking for? Browse other questions tagged .