liveBook · Manning

Signal disposition

As explained in Modern C, Third Edition

A signal disposition is the action configured for a particular signal when that signal is delivered.

For each signal number, a disposition determines what happens when that signal is caught. SIG_DFL selects the platform’s default handler; SIG_IGN ignores the signal. A program can instead install its own handler with signal(). section 19.6

Resetting a handler

A parser’s handler receives a signal number and switches on it. For signals outside its SIGTERM and SIGABRT provisions, it restores the default disposition, records the number, and returns to the interrupted point. A handler takes a signal number and returns no value; that limited interface does not convey where or why the signal arose. section 19.6

TAKEAWAY: Configure a disposition for a specific signal number. Platform-specific signal numbers require platform documentation and reduce C-standard portability. section 19.6

How Modern C, Third Edition covers it

How deep it goes
Defines standard dispositions and handler installation, then explains a reset-and-return path without detailing platform default actions.
Examples
Uses a parser handler that treats SIGTERM and SIGABRT separately and resets other signals to SIG_DFL.
What you can do after
Operate/configure it with signal() to install a handler or restore a signal’s default disposition.
How it connects
Connects signal numbers, signal handlers, interrupts, and the C signal() interface.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Modern C, Third Edition. The section links point to the parts of the book it draws on.