@c ----------------------------------------------------------------------
@node on_exit, process
@heading @code{on_exit}
@subheading Syntax

@example
#include <atexit.h>

int on_exit(void (*func)(int), int value);
@end example

@subheading Description

This function registers a function to be called when the program is
exiting.  The function is passed the @var{value} registered. 
@xref{atexit}

@subheading Return Value

Zero on success, nonzero on failure.

@subheading Example

@example
void my_exiter(int arg)
@{
  cleanup_me(arg, 1);
@}

on_exit(my_exiter, 4);
@end example

