Unix: Sending signals to processes

The kill command provides a lot more functionality than just terminating processes. You can use it to send any of more than 60 signals to processes and what happens next depends on the signal, the process and maybe even your settings.


Signals are software interrupts that are sent to programs to inform them that some important event has occurred. The events themselves might be requests from users or indications that a system problem (such as a memory access error) has occurred. The most commonly sent signals terminate a process. One called "SIGTERM" is sent whenever you issue a kill command with only its process ID as an argument. When you add a -9 (SIGKILL), you are sending a more forceful request that may not give the process in quetion any time to close files it has open or do any other type of housekeeping.

Signals can be sent to processes using the kill command, but this is not the only way that this occurs. When you issue a ^c command to end a foreground process, you are sending a signal 2 (SIGINT) to the process. When you ^d to log out or exit a shell, you are sending a sending a signal 3 (SIGQUIT). Signal 1 (SIGHUP) sends a signal to a process requesting that it reread its configuration file, but keep running.

Photo Credit: 

Sandra H-S

Join us:






Operating SystemsWhite Papers & Webcasts

See more White Papers | Webcasts

Answers - Powered by ITworld

Ask a Question