Signals are software interrupts. They provide a way of managing asynchronous events, for example, a user from the terminal typing the interrupt key or another process sending a signal that must be managed. Every signal has a name that starts with SIG (for example, SIGABRT). This chapter will teach you how to write code to properly manage software interrupts, what the default actions defined by Linux for each signal are, and how to override them.
This chapter will cover the following recipes:Â
- Learning all of the signals and their default actions
- Learning how to ignore a signal
- Learning how to trap a signal
- Learning how to send a signal to another process