In most cases if you want to handle a signal in your application you write a simple signal handler like:

void handler (int sig)

and use the signal(2) system function to run it when a signal is delivered to the process. This is the simplest case, but signals are more interesting than that! Information contained in this article is useful for example when you are writing a daemon and must handle interrupting your program properly without interrupting the current operation or the whole program.

Unix signals is a deep and interesting topic. For example, the signal() function is either referring to the version in the C library or the version in the operating system. The topic of signals has a rich history as part of Unix.

Hi, typo jerk here again:
page3:
Moreover, it lack's features -> lacks
why the signal was send -> sent
page5:
signals like SIGPIPE, SIGUSR1, SIGUSR1 -> SIGUSR2
signal i exits -> it
This program read from it's -> reads, its
Additionally when SIGUSR1 -> Additionally, when [missing comma]
I hope you really, truly don't consider this as some kind of personal attack.

I wouls suggest the reading of "Advanced Programming in the Unix Environment". It does not address
signals with threads, but it is the most extensive explanation of signal handling. It treats also long
jumps to remove races in signal handling.