liveBook · Manning

At_quick_exit

As explained in Modern C

at_quick_exit is the C standard library function that registers a function to be called during quick program termination.

at_quick_exit registers a function for an alternative termination-handler list. The registered function runs during quick termination rather than ordinary termination, making this route useful when normal handlers would take too long. section 8.7

Registering a quick-exit handler

int at_quick_exit(void func(void)); Call at_quick_exit with a function reference, not a function call. For example, at_quick_exit(sayGoodBye) registers sayGoodBye; sayGoodBye() would attempt to execute it immediately. section 8.7

TAKEAWAY: Use at_quick_exit when quick_exit should invoke a separate cleanup policy. Use it with care, because it deliberately bypasses the normal atexit-handler path. section 8.7

How Modern C covers it

How deep it goes
Explains the alternative handler list and registration syntax, but does not detail handler ordering or execution internals.
Examples
Uses the at_quick_exit prototype and parallels it with atexit(sayGoodBye) registration syntax.
What you can do after
Apply it via the C standard library to register a handler for quick program termination.
How it connects
Contrasts quick_exit handling with atexit, _Exit, and abort termination behavior.

Related concepts

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