Skip to content
SetAbortCallback

SetAbortCallback

Description

Set a custom callback function for Abort. If no callback is set, Abort will call the standard abort() function.

Parameters

Name Direction Description
callback in Function to call when Abort is invoked, or NULL to reset to default.

Success

Callback is set.

Failure

Function cannot fail.

Usage example (Cross-references)

Usage examples (Cross-references)
    
        // Set our custom abort handler
        SetAbortCallback(test_abort_handler);
    
        // For non-deadend tests, run normally
    
        // Reset abort handler to default
        SetAbortCallback(NULL);
    
        return test_result;
    static AbortCallback g_abort_callback = NULL;
    
    void SetAbortCallback(AbortCallback callback) {
        g_abort_callback = callback;
    }
Last updated on