quick_exit — terminate 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() nor any registered signal handlers. If a process calls the quick_exit() function more than once, or calls the exit() 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(), 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() [CX] or siglongjmp() 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() 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 _Exit(status).
The quick_exit() function does not return.
No errors are defined.
None.
None.
None.
None.
_Exit, at_quick_exit, atexit, exit
XBD <stdlib.h>
First released in Issue 8. Included for alignment with the ISO/IEC 9899:2018 standard.
return to top of page