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

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

TUPHOOK_ESTABLISH(9)

Contents


STAR

NAME    [Toc]    [Back]

     startuphook_establish, startuphook_disestablish - add or remove a startup
     hook

SYNOPSIS    [Toc]    [Back]

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

     void *
     startuphook_establish(void (*fn)(void *), void *arg);

     void
     startuphook_disestablish(void *cookie);

DESCRIPTION    [Toc]    [Back]

     The  startuphook_establish() function adds fn to the list of
hooks invoked
     by dostartuphooks(9) at startup.   When  invoked,  the  hook
function fn will
     be passed arg as its only argument.

     The startuphook_disestablish() function removes the hook described by the
     opaque pointer cookie from the list of hooks to  be  invoked
at startup.
     If      cookie     is     invalid,     the     result     of
startuphook_disestablish() is undefined.


     Startup hooks should be used to perform one-time  activities
that must
     happen immediately before the root and swap devices are configured, but
     after normal device autoconfiguration.

     Startup hooks are, like shutdown hooks, implemented via  the
more general
     dohooks(9) API.

RETURN VALUES    [Toc]    [Back]

     If  successful,  startuphook_establish()  returns  an opaque
pointer describing
 the newly established startup hook.  Otherwise,  it  returns NULL.

EXAMPLES    [Toc]    [Back]

     It  may  be appropriate to use a startup hook to provide potential root or
     swap devices that have delayed  configuration.   The  iop(4)
shows an example
 of this usage.

SEE ALSO    [Toc]    [Back]

      
      
     dohooks(9), doshutdownhooks(9), dostartuphooks(9)

BUGS    [Toc]    [Back]

     The names are clumsy, at best.

OpenBSD      3.6                           July      27,     2001
[ Back ]
 Similar pages
Name OS Title
shutdownhook_establish NetBSD add or remove a shutdown hook
shutdownhook_establish OpenBSD add or remove a shutdown hook
shutdownhook_disestablish OpenBSD add or remove a shutdown hook
hook_establish OpenBSD add or remove a hook from a specified list
powerhook_establish OpenBSD add or remove a power hook
powerhook_disestablish OpenBSD add or remove a power hook
hook_disestablish OpenBSD add or remove a hook from a specified list
shutdownhook_disestablish NetBSD add or remove a shutdown hook
powerhook_disestablish NetBSD add or remove a power change hook
powerhook_establish NetBSD add or remove a power change hook
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service