To answer your second question first:
SIGKILL cannot be caught by the application, but every other signal can, even
SIGSEGV. This property is useful for debugging -- for instance, with the right library support, you could listen for
SIGSEGV and generate a stack backtrace to show just where that segfault happened.
The official word (for Linux, anyway) on what each signal does is available by typing
man 7 signal from a Linux command line. http://linux.die.net/man/7/signal has the same information, but the tables are harder to read.
However, without some experience with signals, it's hard to know from the short descriptions what they do in practice, so here's my interpretation:
Triggered from the keyboard
SIGINT happens when you hit
SIGQUIT is triggered by
CTRL+\, and dumps core.
SIGTSTP suspends your program when you hit
SIGSTOP, it is catchable, which gives programs like
vi a chance to reset the terminal to a safe state before suspending themselves.
SIGHUP ("hangup") is what happens when you close your xterm (or otherwise disconnect the terminal) while your program is running.
SIGTTOU pause your program if it tries to read from or write to the terminal while it's running in the background. For
SIGTTOU to happen, I think the program needs to be writing to
/dev/tty, not just default stdout.
Triggered by a CPU exception
These mean your program tried to do something wrong.
SIGILL means an illegal or unknown processor instruction. This might happen if you tried to access processor I/O ports directly, for example.
SIGFPE means there was a hardware math error; most likely the program tried to divide by zero.
SIGSEGV means your program tried to access an unmapped region of memory.
SIGBUS means the program accessed memory incorrectly in some other way; I won't go into details for this summary.
SIGPIPE happens if you try to write to a pipe after the pipe's reader closed their end. See
man 7 pipe.
SIGCHLD happens when a child process you created either quits or is suspended (by
SIGSTOP or similar).
Useful for self-signaling
SIGABRT is usually caused by the program calling the
abort() function, and causes a core dump by default. Sort of a "panic button".
SIGALRM is caused by the
alarm() system call, which will cause the kernel to deliver a
SIGALRM to the program after a specified number of seconds. See
man 2 alarm and
man 2 sleep.
SIGUSR2 are used however the program likes. They could be useful for signaling between processes.
Sent by the administrator
These signals are usually sent from the command prompt, via the
kill command, or
bg in the case of
SIGSTOP are the unblockable signals. The first always terminates the process immediately; the second suspends the process.
SIGCONT resumes a suspended process.
SIGTERM is a catchable version of