2009-08-20

Chapter 20: Signals: Fundamental Concepts

This chapter and next two chapters discuss signals. Although the fundamental concepts are quite simple, our discussion is quite lengthy, since there are many details to cover.

This chapter covers the following topics:
  • the various different signals and their purposes;
  • the circumstances in which the kernel may generate a signal for a process, and the system calls that one process may use to send a signal to another process;
  • how a process responds to a signal by default, and the means by which a process can change its response to a signal, in particular, through the use of a signal handler, a programmer-defined function that is automatically invoked on receipt of a signal;
  • the use of a process signal mask to block signals, and the associated notion of pending signals; and
  • how a process can suspend execution and wait for the delivery of a signal.
20 Signals: Fundamental Concepts
20.1 Concepts and Overview
20.2 Signal Types and Default Actions
20.3 Changing Signal Dispositions: signal()
20.4 Introduction to Signal Handlers
20.5 Sending Signals: kill()
20.6 Checking for the Existence of a Process
20.7 Other Ways of Sending Signals: raise() and killpg()
20.8 Displaying Signal Descriptions
20.9 Signal Sets
20.10 The Signal Mask (Blocking Signal Delivery)
20.11 Pending Signals
20.12 Signals Are Not Queued
20.13 Changing Signal Dispositions: sigaction()
20.14 Waiting for a Signal: pause()
20.15 Summary
20.16 Exercises

2 comments:

  1. One humble suggestion: in "20.14 Waiting for a Signal: pause()", how about mentioning the "self pipe trick" and "signalfd(2)" for integrating signal handling into event driven programs that already has a select based main loop?

    ReplyDelete
  2. Hello Scott: I do cover both of these topics, but in other chapters. signalfd(2) is covered in Chapter 22; the self-pipe trick is covered in Chapter 63.

    ReplyDelete