at_quick_exit(3)

at_quick_exit3

Registers a cleanup function to run on quick exit

Usage

#include <stdlib.h>

int

at_quick_exit(void (*func)(void));

Library

Standard C Library (libc, -lc)

Overview

The at_quick_exit() function registers a cleanup function to be called when the program exits as a result of calling quick_exit(3). The cleanup functions are called in the reverse order and will not be called if the program exits by calling exit(3), _Exit(3), or abort(3).

Return values

The at_quick_exit() function returns the value 0 if successful and a non-zero value on failure.

Releases

Unchanged in 13 releases since macOS 15.0.

  1. 15.0–26.5

Standards

The at_quick_exit() function conforms to ISO/IEC 9899:2011 (“ISO C11”).

From Libc 1752.120.2 in macOS 26.5. Parsed by carta from the page's mdoc source.