*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->OpenBSD man pages -> dohooks (9)              
Title
Content
Arch
Section
 

DOHOOKS(9)

Contents


NAME    [Toc]    [Back]

     dohooks - run all hooks in a list

SYNOPSIS    [Toc]    [Back]

     #include <sys/types.h>
     #include <sys/systm.h>

     void
     dohooks(struct hook_desc_head *head, int flags);

DESCRIPTION    [Toc]    [Back]

     The dohooks() function invokes all hooks  established  using
the
     hook_establish(9)  function.   Hooks are called in the order
of the TAILQ
     that head points to, however hook_establish(9) 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.

     The  flags  can  specify  HOOK_REMOVE to remove already processed hooks from
     the hook list and HOOK_FREE to also free them.  In most cases either no
     flags  should  be  used  or HOOK_REMOVE and 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.

     This function is used to implement the doshutdownhooks(9) as
well as the
     dostartuphooks(9) macros.

SEE ALSO    [Toc]    [Back]

      
      
     doshutdownhooks(9), dostartuphooks(9), hook_establish(9)

OpenBSD      3.6                           July      27,     2001
[ Back ]
 Similar pages
Name OS Title
dostartuphooks OpenBSD run all startup hooks
doshutdownhooks NetBSD run all shutdown hooks
dopowerhooks NetBSD run all power hooks
dopowerhooks OpenBSD run all power hooks
doshutdownhooks OpenBSD run all shutdown hooks
res_send_setqhook IRIX interface to resolver hooks
slocal Tru64 MH receive-mail hooks
field_term FreeBSD set hooks for automatic invocation by applications
field_init FreeBSD set hooks for automatic invocation by applications
form_hook FreeBSD set hooks for automatic invocation by applications
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service