Previous: Resuming Execution, Up: Stopping [Contents][Index]
A signal is an asynchronous event that can happen in a program. The
operating system defines the possible kinds of signals, and gives each
kind a name and a number. For example, in Unix SIGINT
is the
signal a program gets when you type an interrupt character (often
C-c); SIGALRM
occurs when the alarm clock timer goes off
(which happens only if your program has requested an alarm).
GNU Remake sets up some signal handlers of children it spawns. When we are running under the debugger when and we get a signal the debugger read loop is entered.
Some signals, including SIGALRM
, are a normal part of the
functioning of your program. Others, such as SIGSEGV
, indicate
errors; these signals are fatal (they kill your program
immediately) if the program has not specified in advance some other
way to handle the signal. SIGINT
does not indicate an error in
your program, but it is normally fatal so it can carry out the purpose
of the interrupt: to kill the program.