X-Git-Url: https://pd.if.org/git/?p=pdclib.old;a=blobdiff_plain;f=man3%2Fatexit.3;fp=man3%2Fatexit.3;h=09fe18dfa1f7b7407869cc553639e79334f48023;hp=a210266150be56a057244b607acdd77ae1ecb75e;hb=4a3ef8e66ad07656caa1e6a2bc69823926b880e3;hpb=b5b6c4a890795ea76f9b92b817b0a83c6bb4862c diff --git a/man3/atexit.3 b/man3/atexit.3 index a210266..09fe18d 100644 --- a/man3/atexit.3 +++ b/man3/atexit.3 @@ -4,17 +4,17 @@ .Dd .Dt atexit 3 .Os - +.\" .Sh NAME .Nm atexit .Nd registration of functions to be invoked before process termination - +.\" .Sh SYNOPSIS .In stdlib.h .Fn "int atexit" "void (*handler)(void)" .Fn "int at_quick_exit" "void (*handler)(void)" (C11, C++11) - +.\" .Sh DESCRIPTION These functions register a function to be called when the corresponding process exit function is invoked. For @@ -25,7 +25,7 @@ for .Fn at_quick_exit the function will be invoked when the process is terminated by calling .Fn quick_exit . - +.\" .Pp These functions are used in order to permit a program to perform actions before a process is terminated; for example, releasing an interprocess semaphore. @@ -36,14 +36,14 @@ handlers; the purpose of is to support the abandonning of a process when normal process termination might not be possible; at_quick_exit handlers should therefore be used sparingly and only when their use is essential. - +.\" .Pp The standard guarantees that .Fn atexit and .Fn at_quick_exit may each be called at least 32 times successfully. - +.\" .Pp .Fn atexit and @@ -51,7 +51,7 @@ and handlers are called in reverse order of the order they were registered in. For precise details of their ordering, see .Xr exit 3 . - +.\" .Pp The result of exiting from a handler registered with .Fn atexit @@ -66,7 +66,7 @@ or should throw, .Fn std::terminate is invoked. - +.\" .Pp Undefined behaviour results if an .Fn atexit @@ -76,19 +76,19 @@ handler calls .Fn exit or .Fn quick_exit . - +.\" .Sh RETURN VALUES Returns 0 to indicate success; nonzero returns indicate failure. - +.\" .Sh ERRORS No errors are defined - +.\" .Sh SEE ALSO .Xr abort 3 .Xr exit 3 .Xr quick_exit 3 .Xr _Exit 3 - +.\" .Sh STANDARDS .Fn atexit is first defined in