summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdlib/atexit.3
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/stdlib/atexit.3')
-rw-r--r--lib/libc/stdlib/atexit.314
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/libc/stdlib/atexit.3 b/lib/libc/stdlib/atexit.3
index d6dab56..68f4e8f 100644
--- a/lib/libc/stdlib/atexit.3
+++ b/lib/libc/stdlib/atexit.3
@@ -44,6 +44,8 @@
.In stdlib.h
.Ft int
.Fn atexit "void (*function)(void)"
+.Ft int
+.Fn atexit_b "void (^function)(void)"
.Sh DESCRIPTION
The
.Fn atexit
@@ -69,6 +71,12 @@ process termination, for example by calling
.Pp
At least 32 functions can always be registered,
and more are allowed as long as sufficient memory can be allocated.
+.Pp
+The
+.Fn atexit_b
+function behaves identically to
+.Fn atexit ,
+except that it takes a block, rather than a function pointer.
.\" XXX {ATEXIT_MAX} is not implemented yet
.Sh RETURN VALUES
.Rv -std atexit
@@ -77,6 +85,12 @@ and more are allowed as long as sufficient memory can be allocated.
.It Bq Er ENOMEM
No memory was available to add the function to the list.
The existing list of functions is unmodified.
+.It Bq Er ENOSYS
+The
+.Fn atexit_b
+function was called by a program that did not supply a
+.Fn _Block_copy
+implementation.
.El
.Sh SEE ALSO
.Xr at_quick_exit 3
OpenPOWER on IntegriCloud