Skip to content

ProcDestroy

Description

Terminate the child process and then destroy given Proc structure.

Parameters

Name Direction Description
proc in Child process handle to terminate and destroy.
alloc in Allocator originally passed to ProcCreate. Used to free the handle. Must match the create-time allocator.

Success

Return

Failure

Abort with log message.

Usage example (Cross-references)

Usage examples (Cross-references)
    
    
    void ProcDestroy(Proc *proc, Allocator *alloc) {
        if (!proc) {
            LOG_FATAL("Invalid argument");
        }
        if (!alloc) {
            LOG_FATAL("ProcDestroy requires the allocator that created the handle");
        }
        ProcTerminate(proc);
    
        // finally terminate
        ProcDestroy(proc, &alloc.base);
    
        LogDeinit();
Last updated on