OpenBSD manual page server

Manual Page Search Parameters

DOSHUTDOWNHOOKS(9) Kernel Developer's Manual DOSHUTDOWNHOOKS(9)

doshutdownhooksrun all shutdown hooks

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

void
doshutdownhooks(void);

The () function invokes all shutdown hooks established using the shutdownhook_establish(9) function. Shutdown hooks are called in reverse order, i.e., the shutdown hook established last will be called first.

This function is called from boot(9) with interrupts turned off. It is called immediately before the system is halted or rebooted, after file systems have been unmounted, after the clock has been updated, and after a system dump has been done (if necessary).

Shutdown hooks are, like startup hooks, implemented via the more general dohooks(9) API.

boot(9), dohooks(9), domountroothooks(9), dostartuphooks(9), shutdownhook_establish(9)

June 4, 2013 OpenBSD-5.6