#include <Daemon.h>
Public Member Functions | |
void | fork () |
Fork a daemon process. | |
Static Public Member Functions | |
static pid_t | getPid (uint16_t port) |
Check daemon is running on port, throw exception if not. | |
Protected Member Functions | |
virtual void | parent ()=0 |
Called in parent process. | |
virtual void | child ()=0 |
Called in child process. | |
uint16_t | wait (int timeout) |
Call from parent(): wait for child to indicate it is ready. | |
void | ready (uint16_t port) |
Call from child(): Notify the parent we are ready and write the PID file. |
NB: Only one Daemon instance is allowed in a process.
void qpid::broker::Daemon::fork | ( | ) |
uint16_t qpid::broker::Daemon::wait | ( | int | timeout | ) | [protected] |
void qpid::broker::Daemon::ready | ( | uint16_t | port | ) | [protected] |