*** UNIX MANUAL PAGE BROWSER ***

A Nergahak database for man pages research.

Navigation

Directory Browser

1Browse 4.4BSD4.4BSD
1Browse Digital UNIXDigital UNIX 4.0e
1Browse FreeBSDFreeBSD 14.3
1Browse MINIXMINIX 3.4.0rc6-d5e4fc0
1Browse NetBSDNetBSD 10.1
1Browse OpenBSDOpenBSD 7.7
1Browse UNIX v7Version 7 UNIX
1Browse UNIX v10Version 10 UNIX

Manual Page Search

Manual Page Result

0 Command: shutdownhook_establish | Section: 9 | Source: NetBSD | File: shutdownhook_establish.9
SHUTDOWNHOOK_ESTABLISH(9) FreeBSD Kernel Developer's Manual NAME shutdownhook_establish, shutdownhook_disestablish - add or remove a shutdown hook SYNOPSIS void * shutdownhook_establish(void (*fn)(void *), void *arg); void shutdownhook_disestablish(void *cookie); DESCRIPTION The shutdownhook_establish API is deprecated. The shutdownhook_establish() function adds fn to the list of hooks invoked by doshutdownhooks(9) at shutdown. When invoked, the hook function fn will be passed arg as its only argument. The shutdownhook_disestablish() function removes the hook described by the opaque pointer cookie from the list of hooks to be invoked at shutdown. If cookie is invalid, the result of shutdownhook_disestablish() is undefined. Shutdown hooks should be used to perform one-time activities that must happen immediately before the kernel exits. Because of the environment in which they are run, shutdown hooks cannot rely on many system services (including file systems, and timeouts and other interrupt-driven services), or even basic system integrity (because the system could be rebooting after a crash). RETURN VALUES If successful, shutdownhook_establish() returns an opaque pointer describing the newly-established shutdown hook. Otherwise, it returns NULL. EXAMPLES It may be appropriate to use a shutdown hook to disable a device that does direct memory access, so that the device will not try to access memory while the system is rebooting. It may be appropriate to use a shutdown hook to inform watchdog timer hardware that the operating system is no longer running. SEE ALSO doshutdownhooks(9) BUGS The names are clumsy, at best. FreeBSD 14.1-RELEASE-p8 May 14, 2009 FreeBSD 14.1-RELEASE-p8

Navigation Options