summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2002-07-12 13:32:39 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2002-07-12 13:32:39 +0000
commit9676a33b97bb57b158d7b6405e512396ad9107d8 (patch)
tree1ef8ae80947905a5e96615ddf01124f2e1597ed0 /share
parent3dc8cff9e6875638e98e202b9d06bd6d4f1e59cc (diff)
Document the API change.
Diffstat (limited to 'share')
-rw-r--r--share/man/man9/dohooks.917
1 files changed, 15 insertions, 2 deletions
diff --git a/share/man/man9/dohooks.9 b/share/man/man9/dohooks.9
index 2590caad55e..d0407c10811 100644
--- a/share/man/man9/dohooks.9
+++ b/share/man/man9/dohooks.9
@@ -1,4 +1,4 @@
-.\" $OpenBSD: dohooks.9,v 1.2 2001/07/28 00:09:24 mpech Exp $
+.\" $OpenBSD: dohooks.9,v 1.3 2002/07/12 13:32:38 art Exp $
.\"
.\" Copyright (c) 2001 Niklas Hallqvist.
.\" All rights reserved.
@@ -34,7 +34,7 @@
.Sh SYNOPSIS
.Fd #include <sys/systm.h>
.Ft void
-.Fn dohooks "struct hook_desc_head *head"
+.Fn dohooks "struct hook_desc_head *head" "int flags"
.Sh DESCRIPTION
The
.Fn dohooks
@@ -49,6 +49,19 @@ can put the hooks either at the head or the tail of that queue,
making it possible to call the hooks either in the order of
establishment, or its reverse.
.Pp
+The flags can specify
+.Dv HOOK_REMOVE
+to remove already processed hooks from the hook list and
+.Dv HOOK_FREE
+to also free them.
+In most cases either no flags should be used or
+.Dv HOOK_REMOVE
+and
+.Dv HOOK_FREE
+at the same time, since just HOOK_REMOVE will drop the only reference to
+allocated memory and should only be used in situations where freeing
+memory would be illegal and unnecessary.
+.Pp
This function is used to implement the
.Xr doshutdownhooks 9
as well as the