4.3BSD-Reno/share/man/cat3/atexit.0

Compare this file to the similar file:
Show the results in this format:




ATEXIT(3)		      1990			ATEXIT(3)



NNAAMMEE
     atexit - register a function to be called on exit

SSYYNNOOPPSSIISS
     ##iinncclluuddee <<ssttddlliibb..hh>>

     aatteexxiitt((vvooiidd ((**ffuunnccttiioonn))(())))

DDEESSCCRRIIPPTTIIOONN
     AAtteexxiitt registers the given _f_u_n_c_t_i_o_n to be called at program
     exit, whether via _e_x_i_t(3) or via return from the program's
     mmaaiinn.  Functions so registered are called in reverse order;
     no arguments are passed.  At least 32 functions can always
     be registered, and more are allowed as long as sufficient
     memory can be allocated.

RREETTUURRNN VVAALLUUEE
     AAtteexxiitt returns 0 on success, -1 on error.

EERRRROORRSS
     [ENOMEM]
	  No memory was available to add the function to the
	  list.  The existing list of functions is unmodified.

SSEEEE AALLSSOO
     exit(3)

SSTTAANNDDAARRDDSS
     AAtteexxiitt conforms to ANSI X3.159-1989 (``ANSI C'').


























Printed 7/27/90                May				1