Exit processing API function

int purify_exit (int status)

This function behaves like the function exit, unless Purify detects any unsuppressed errors, leaks, or potential leaks, in which case it ORs special flag bits into the status value you supply. These are:

Unsuppressed error        Bit OR'd in exit status

Memory access errors      0x40
Memory leaks                    0x20
Potential memory leaks      0x10

You can replace the call to exit(status) or the return status in main with this function. If Purify is not running, purify_exit behaves like the regular exit function.