From 7ba2c88bf7980dfeb0f3814b69003ba150ea2a14 Mon Sep 17 00:00:00 2001 From: deraadt <> Date: Sat, 6 Aug 2005 18:43:23 +0000 Subject: tell people that atexit is bad; ok jmc --- src/lib/libc/stdlib/atexit.3 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/lib/libc/stdlib/atexit.3 b/src/lib/libc/stdlib/atexit.3 index c8d4ce63d5..0af10cfe81 100644 --- a/src/lib/libc/stdlib/atexit.3 +++ b/src/lib/libc/stdlib/atexit.3 @@ -29,7 +29,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $OpenBSD: atexit.3,v 1.5 2003/06/02 20:18:37 millert Exp $ +.\" $OpenBSD: atexit.3,v 1.6 2005/08/06 18:43:23 deraadt Exp $ .\" .Dd June 29, 1991 .Dt ATEXIT 3 @@ -54,6 +54,12 @@ 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. +.Pp +.Fn atexit +is very difficult to use correctly without creating +.Xr exit 3 Ns -time +races. +Unless absolutely neccessary, please avoid using it. .Sh RETURN VALUES .Rv -std atexit .Sh ERRORS -- cgit v1.2.3-55-g6feb