GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  EXPLAIN_EXIT (3)

NAME

explain_exit - print an explanation of exit status before exiting

CONTENTS

Synopsis
Description
     Call Exit As Normal
     Caveat
See Also
Copyright
Author

SYNOPSIS

#include <libexplain/libexplain.h>

void explain_exit_on_exit(void);
void explain_exit_on_error(void);
void explain_exit_cancel(void);

DESCRIPTION

The I]explain_exit_on_exit function may be used to have the calling program print an explanation of its exit status (the value passed to I]exit(3) or the return value from I]main) immediately before it terminates.

The I]explain_exit_on_error function may be used to have the calling program print an explanation of its exit status immediately before it terminates, if that exit status is not EXIT_SUCCESS.

The I]explain_exit_cancel function may be used to cancel the effect of the I]explain_exit_on_exit or I]explain_exit_on_error function.

These functions may be called multiple times, and in any order. The last called has precedence. The explanation will never be printed more than once.

    Call Exit As Normal

In order to have the explanation printed, simply call I]exit(3) as normal, or return from I]main as normal. Do not call any of these functions in order to exit your program, they are called before you exit your program.

    Caveat

This functionality is only available on systems with the I]on_exit(3) system call. Unfortunately, the I]atexit(3) system call is not sufficiently capable, as it does not pass the exit status to the registered function.

SEE ALSO

I]exit(3) cause normal process termination
I]atexit(3)
  register a function to be called at normal process termination
I]on_exit(3)
  register a function to be called at normal process termination

COPYRIGHT

libexplain version 1.3
Copyright © 2009 Peter Miller

AUTHOR

Written by Peter Miller <pmiller@opensource.org.au>
Search for    or go to Top of page |  Section 3 |  Main Index


EXPLAIN_EXIT (3) -->

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.