Application class that provides the standard features needed by applications
that run as a daemon:
* Command line parsing
* Version support
* Reading of config file
* Auto-configuration of loggers
* Periodic stats logging
* Re-opening of log files upon receipt of SIGHUP (intended to be used
in conjunction with logrotate)
Usage example:
See DaemonApp class' documented unittest
A note on epoll:
The daemon app does not currently interact with epoll in any way (either
registering clients or starting the event loop). This is a deliberate
choice, in order to leave the epoll handling up to the user, without
enforcing any required sequence of events. (This may come in the future.)
However, some extensions (namely, the SignalExt and TimerExt) require an
epoll instance for their internal event handling. For this reason, an epoll
instance must be passed to the DaemonApp. To do so, pass an epoll instance
to the startEventHandling method.
Boost Software License Version 1.0. See LICENSE_BOOST.txt for details.
Alternatively, this file may be distributed under the terms of the Tango
3-Clause BSD License (see LICENSE_BSD.txt for details).
Application class that provides the standard features needed by applications that run as a daemon: * Command line parsing * Version support * Reading of config file * Auto-configuration of loggers * Periodic stats logging * Re-opening of log files upon receipt of SIGHUP (intended to be used in conjunction with logrotate)
Usage example: See DaemonApp class' documented unittest
A note on epoll:
The daemon app does not currently interact with epoll in any way (either registering clients or starting the event loop). This is a deliberate choice, in order to leave the epoll handling up to the user, without enforcing any required sequence of events. (This may come in the future.)
However, some extensions (namely, the SignalExt and TimerExt) require an epoll instance for their internal event handling. For this reason, an epoll instance must be passed to the DaemonApp. To do so, pass an epoll instance to the startEventHandling method.