Next: , Previous: , Up: Special handlers   [Contents][Index]


4.15.2 Global startup and shutdown handlers.

Yet another pair of special handlers, startup and shutdown, can be used for global initialization and cleanup.

Handler: startup

The startup handler is called exactly once, as a part of mailfromd startup session.

This handler is normally used in mfmod interface modules to load the shared library part (see mfmod).

Handler: shutdown

This handler is called during the normal program shutdown sequence, before exiting.

Both handlers bear certain similarity to begin and end: they take no arguments, and their use is subject to the same restrictions (see begin/end restrictions). Additionally, the following features cannot be used in global handlers:

  1. Sendmail macros.
  2. Message modification functions.