Sending Signals
- Typing certain key combinations at the controlling terminal of a running process causes the system to send it certain signals:
- Ctrl-C (in older Unixes, DEL) sends an INT signal (SIGINT); by default, this causes the process to terminate.
- Ctrl-Z sends a TSTP signal (SIGTSTP); by default, this causes the process to suspend execution.
- Ctrl-\ sends a QUIT signal (SIGQUIT); by default, this causes the process to terminate and dump core.
- (Those default key combinations can be changed with the stty command.)
 
- The kill(2) system call will send the specified signal to the process, if permissions allow. Similarly, the kill(1) command allows a user to send signals to processes. The raise(3)library function sends the specified signal to the current process.
- Exceptions such as division by zero or a segmentation violation will generate signals (here, SIGFPE and SIGSEGV respectively, which both by default cause a core dump and a program exit).
- The kernel can generate a signal to notify the process of an event. For example, SIGPIPE will be generated when a process writes to a pipe which has been closed by the reader; by default, this causes the process to terminate, which is convenient when constructing shell pipelines.
Read more about this topic: Unix Signal
Famous quotes containing the words sending and/or signals:
“Alexander Woollcott broadcasts the story of the wife who returned a dog to the Seeing Eye with this note attached: I am sending the dog back. My husband used to depend on me. Now he is independent, and I never know where he is.”
—For the State of New Jersey, U.S. public relief program (1935-1943)
“The term preschooler signals another change in our expectations of children. While toddler refers to physical development, preschooler refers to a social and intellectual activity: going to school. That shift in emphasis is tremendously important, for it is at this age that we think of children as social creatures who can begin to solve problems.”
—Lawrence Kutner (20th century)