QUICK_EXIT(3) Library Functions Manual QUICK_EXIT(3)

quick_exitterminate a process

#include <stdlib.h>

_Noreturn void quick_exit(int status);

[CX] The functionality described on this reference page is aligned with the ISO C standard. Any conflict between the requirements described here and the ISO C standard is unintentional. This volume of POSIX.1-2024 defers to the ISO C standard.

The quick_exit () function shall cause normal process termination to occur. It shall not call functions registered with atexit(3) nor any registered signal handlers. If a process calls the quick_exit () function more than once, or calls the exit(3) function in addition to the quick_exit () function, the behavior is undefined. If a signal is raised while the quick_exit () function is executing, the behavior is undefined.

The quick_exit () function shall first call all functions registered by at_quick_exit(3), in the reverse order of their registration, except that a function is called after any previously registered functions that had already been called at the time it was registered. If, during the call to any such function, a call to the longjmp(3) [CX] or siglongjmp(3) function is made that would terminate the call to the registered function, the behavior is undefined.

If a function registered by a call to at_quick_exit(3) fails to return, the remaining registered functions shall not be called and the rest of the quick_exit () processing shall not be completed.

Finally, the quick_exit () function shall terminate the process as if by a call to ( ).

The quick_exit () function does not return.

No errors are defined.

None.

None.

None.

None.

_Exit(3), at_quick_exit(3), atexit(3), exit(3)

XBD <stdlib.h>

First released in Issue 8. Included for alignment with the ISO/IEC 9899:2018 standard.

June 14, 2024 posix.fail