Main index | Section 3 | Options |
#include <stdlib.h>
The runtime-constraint handler is the callback function invoked when a library function detects a runtime-constraint violation.
The arguments are as follows:
msg | |
A pointer to a character string describing the runtime-constraint violation. | |
ptr | |
A NULL pointer. | |
error | |
If the function calling the handler has a return type declared as errno_t, the return value of the function is passed. Otherwise, a positive value of type errno_t is passed. | |
Only the most recent handler registered with set_constraint_handler_s() is called when a runtime-constraint violation occurs.
The implementation has a default constraint handler that is used if no calls to the set_constraint_handler_s() function have been made. If the handler argument to set_constraint_handler_s() is a NULL pointer, the default handler becomes the current constraint handler.
The abort_handler_s() and ignore_handler_s() are the standard-defined runtime-constraint handlers provided by the C library.
The abort_handler_s() function writes the error message including the msg to stderr and calls the abort(3) function. The abort_handler_s() is currently the default runtime-constraint handler.
The ignore_handler_s() simply returns to its caller.
The abort_handler_s() function does not return to its caller.
The ignore_handler_s() function returns no value.
SET_CONSTRAINT_HANDLER_S (3) | August 18, 2018 |
Main index | Section 3 | Options |
Please direct any comments about this manual page service to Ben Bullock. Privacy policy.
“ | If you have a problem and you think awk(1) is the solution, then you have two problems. | ” |
— David Tilbrook |