Dibbler - a portable DHCPv6  1.0.2RC1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Port-bsd/daemon.cpp File Reference
#include <iostream>
#include <string>
#include <fstream>
#include <signal.h>
#include <unistd.h>
#include <fcntl.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include "Portable.h"
#include "Logger.h"
+ Include dependency graph for Port-bsd/daemon.cpp:

Functions

void daemon_die ()
void daemon_init ()
void die (const char *pidfile)
pid_t getClientPID ()
pid_t getPID (const char *file)
pid_t getRelayPID ()
pid_t getServerPID ()
int init (const char *pidfile, const char *workdir)
int install ()
void logEnd ()
void logStart (const char *note, const char *logname, const char *logfile)
int run ()
int start (const char *pidfile, const char *workdir)
int status ()
int stop (const char *pidfile)
int uninstall ()

Variables

std::string WORKDIR

Function Documentation

void daemon_die ( )
void daemon_init ( )
void die ( const char *  pidfile)
pid_t getClientPID ( )
pid_t getPID ( const char *  file)

checks if pid file exists, and returns its content (or -2 if unable to read)

Parameters
file
Returns
pid value, or negative if error was detected
pid_t getRelayPID ( )
pid_t getServerPID ( )
int init ( const char *  pidfile,
const char *  workdir 
)
Todo:
: This is Linux specific. It will most likely not work on BSD or Mac OS
int install ( )
void logEnd ( )

things to do just before end

void logStart ( const char *  note,
const char *  logname,
const char *  logfile 
)

things to do just after started

int run ( )
int start ( const char *  pidfile,
const char *  workdir 
)
int status ( )
int stop ( const char *  pidfile)
int uninstall ( )

Variable Documentation

std::string WORKDIR