Query: shutdownhook_establish
OS: netbsd
Section: 9
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
SHUTDOWNHOOK_ESTABLISH(9) BSD Kernel Developer's Manual SHUTDOWNHOOK_ESTABLISH(9)NAMEshutdownhook_establish, shutdownhook_disestablish -- add or remove a shutdown hookSYNOPSISvoid * shutdownhook_establish(void (*fn)(void *), void *arg); void shutdownhook_disestablish(void *cookie);DESCRIPTIONThe 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 func- tion 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 environ- ment 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 VALUESIf successful, shutdownhook_establish() returns an opaque pointer describing the newly-established shutdown hook. Otherwise, it returns NULL.EXAMPLESIt 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 ALSOdoshutdownhooks(9)BUGSThe names are clumsy, at best.BSDMay 14, 2009 BSD
Similar Topics in the Unix Linux Community |
---|
Ksplice 0.9.2 (Default branch) |
Ksplice 0.9.4 (Default branch) |
Ksplice 0.9.5 (Default branch) |
Shutdown all systems remotely |
Howto compile my own module into the kernel |