diff options
Diffstat (limited to 'src/lib/libc/stdlib/atexit.3')
| -rw-r--r-- | src/lib/libc/stdlib/atexit.3 | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/src/lib/libc/stdlib/atexit.3 b/src/lib/libc/stdlib/atexit.3 index 07de054d3c..0615feabb1 100644 --- a/src/lib/libc/stdlib/atexit.3 +++ b/src/lib/libc/stdlib/atexit.3 | |||
| @@ -13,11 +13,7 @@ | |||
| 13 | .\" 2. Redistributions in binary form must reproduce the above copyright | 13 | .\" 2. Redistributions in binary form must reproduce the above copyright |
| 14 | .\" notice, this list of conditions and the following disclaimer in the | 14 | .\" notice, this list of conditions and the following disclaimer in the |
| 15 | .\" documentation and/or other materials provided with the distribution. | 15 | .\" documentation and/or other materials provided with the distribution. |
| 16 | .\" 3. All advertising materials mentioning features or use of this software | 16 | .\" 3. Neither the name of the University nor the names of its contributors |
| 17 | .\" must display the following acknowledgement: | ||
| 18 | .\" This product includes software developed by the University of | ||
| 19 | .\" California, Berkeley and its contributors. | ||
| 20 | .\" 4. Neither the name of the University nor the names of its contributors | ||
| 21 | .\" may be used to endorse or promote products derived from this software | 17 | .\" may be used to endorse or promote products derived from this software |
| 22 | .\" without specific prior written permission. | 18 | .\" without specific prior written permission. |
| 23 | .\" | 19 | .\" |
| @@ -33,10 +29,9 @@ | |||
| 33 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 29 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
| 34 | .\" SUCH DAMAGE. | 30 | .\" SUCH DAMAGE. |
| 35 | .\" | 31 | .\" |
| 36 | .\" from: @(#)atexit.3 5.3 (Berkeley) 6/29/91 | 32 | .\" $OpenBSD: atexit.3,v 1.8 2007/05/31 19:19:31 jmc Exp $ |
| 37 | .\" $Id: atexit.3,v 1.1.1.1 1995/10/18 08:42:16 deraadt Exp $ | ||
| 38 | .\" | 33 | .\" |
| 39 | .Dd June 29, 1991 | 34 | .Dd $Mdocdate: May 31 2007 $ |
| 40 | .Dt ATEXIT 3 | 35 | .Dt ATEXIT 3 |
| 41 | .Os | 36 | .Os |
| 42 | .Sh NAME | 37 | .Sh NAME |
| @@ -49,17 +44,22 @@ | |||
| 49 | .Sh DESCRIPTION | 44 | .Sh DESCRIPTION |
| 50 | The | 45 | The |
| 51 | .Fn atexit | 46 | .Fn atexit |
| 52 | function | 47 | function registers the given |
| 53 | registers the given | 48 | .Fa function |
| 54 | .Ar function | ||
| 55 | to be called at program exit, whether via | 49 | to be called at program exit, whether via |
| 56 | .Xr exit 3 | 50 | .Xr exit 3 |
| 57 | or via return from the program's | 51 | or via return from the program's |
| 58 | .Em main . | 52 | .Fn main . |
| 59 | Functions so registered are called in reverse order; | 53 | Functions so registered are called in reverse order; |
| 60 | no arguments are passed. | 54 | no arguments are passed. |
| 61 | At least 32 functions can always be registered, | 55 | At least 32 functions can always be registered, |
| 62 | and more are allowed as long as sufficient memory can be allocated. | 56 | and more are allowed as long as sufficient memory can be allocated. |
| 57 | .Pp | ||
| 58 | .Fn atexit | ||
| 59 | is very difficult to use correctly without creating | ||
| 60 | .Xr exit 3 Ns -time | ||
| 61 | races. | ||
| 62 | Unless absolutely necessary, please avoid using it. | ||
| 63 | .Sh RETURN VALUES | 63 | .Sh RETURN VALUES |
| 64 | .Rv -std atexit | 64 | .Rv -std atexit |
| 65 | .Sh ERRORS | 65 | .Sh ERRORS |
| @@ -73,6 +73,5 @@ The existing list of functions is unmodified. | |||
| 73 | .Sh STANDARDS | 73 | .Sh STANDARDS |
| 74 | The | 74 | The |
| 75 | .Fn atexit | 75 | .Fn atexit |
| 76 | function | 76 | function conforms to |
| 77 | conforms to | ||
| 78 | .St -ansiC . | 77 | .St -ansiC . |
