Understanding UNIX Signals

A signal is an asynchronous software interrupt. The asynchronous nature of the signal prevents your program from anticipating when it will arrive. Consequently, a signal action must be registered before the signal's arrival.

A signal will suspend the execution of the program. The signal handling procedure then invokes the registered function or action. The function that is called to handle a signal is known as a signal handler.

When you want to interrupt a program that is executing, you interrupt it with the signal SIGINT. Another way of expressing this is to say that the signal SIGINT is raised. For many people, this is accomplished by entering Ctrl+C, but the character you use may be configured differently. To determine ...

Get Advanced UNIX Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.