poser
A C framework for POsix SERvices
|
Run something as a daemon. More...
#include <poser/core/daemon.h>
Static Public Member Functions | |
int | PSC_Daemon_run (PSC_Daemon_main dmain, void *data) |
Run as a daemon. | |
void | PSC_Daemon_launched (void) |
Notify parent that the daemon successfully started. | |
Run something as a daemon.
|
static |
Notify parent that the daemon successfully started.
When this is called from the running daemon, the parent process exits.
Note this is automatically called by PSC_Service_run() if needed.
|
static |
Run as a daemon.
Runs a given function in a detached child process and optionally handles a pidfile. By default, it waits for successful startup of the daemon, passing through stderr output of the child. The behavior can be configured using PSC_Runopts.
Note this is automatically used by PSC_Service_run().
dmain | the main function for the daemon |
data | data to pass to the main function |