Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

daemon_unix.cc File Reference

#include "daemon.h"
#include "main.h"
#include "daemon_unix.h"
#include <iostream.h>
#include <fstream.h>
#include <stdlib.h>
#include <errno.h>
#include <string>

Include dependency graph for daemon_unix.cc:

Go to the source code of this file.

Namespaces

namespace  omniORB
namespace  Omniifr

Defines

#define NEED_PACKAGE_INFO
#define STRERR_FILE_LINE   strerror(errno)<<" "<<__FILE__<<":"<<__LINE__
#define PIPE_READ   0
#define PIPE_WRITE   1

Functions

void setLogFunction (void(*logFunction)(const char *))
void shutdown0 (void)
 Param to atexit().
void shutdown2 (int s, void *)
 Param to on_exit().

Variables

DaemonImpl daemon
 Singleton - only at file scope.


Define Documentation

#define NEED_PACKAGE_INFO
 

Definition at line 28 of file daemon_unix.cc.

#define PIPE_READ   0
 

Definition at line 87 of file daemon_unix.cc.

Referenced by Omniifr::DaemonImpl::fork(), and Omniifr::DaemonImpl::waitForChild().

#define PIPE_WRITE   1
 

Definition at line 88 of file daemon_unix.cc.

Referenced by Omniifr::DaemonImpl::fork(), and Omniifr::DaemonImpl::notifyParent().

#define STRERR_FILE_LINE   strerror(errno)<<" "<<__FILE__<<":"<<__LINE__
 

Definition at line 85 of file daemon_unix.cc.

Referenced by Omniifr::DaemonImpl::checkPidfileOrShutdown(), Omniifr::DaemonImpl::daemonize(), Omniifr::DaemonImpl::fork(), Omniifr::DaemonImpl::notifyParent(), Omniifr::DaemonImpl::redirectStreamsTo(), Omniifr::DaemonImpl::shutdown(), and Omniifr::DaemonImpl::waitForChild().


Function Documentation

void omniORB::setLogFunction void(*)(const char *)  logFunction  ) 
 

Referenced by Omniifr::Service::daemonize(), and Omniifr::DaemonImpl::daemonize().

void Omniifr::shutdown0 void   ) 
 

Param to atexit().

Definition at line 114 of file daemon_unix.cc.

References Omniifr::daemon, and Omniifr::DaemonImpl::shutdown().

Referenced by Omniifr::Service::daemonize(), and Omniifr::DaemonImpl::daemonize().

void shutdown2 int  s,
void * 
 

Param to on_exit().

Definition at line 115 of file daemon_unix.cc.

References Omniifr::daemon, and Omniifr::DaemonImpl::shutdown().

Referenced by Omniifr::DaemonImpl::daemonize().


Variable Documentation

DaemonImpl Omniifr::daemon
 

Singleton - only at file scope.

Although we initialize the value to NULL, we don't trust that the runtime will actually initialise it.

Definition at line 94 of file daemon_unix.cc.

Referenced by Omniifr::Daemon::Daemon(), Omniifr::Daemon::daemonize(), Omniifr::Daemon::foreground(), Omniifr::DaemonImpl::log(), main(), Omniifr::Daemon::pidfile(), Omniifr::Daemon::runningOk(), Omniifr::shutdown0(), Omniifr::shutdown2(), Omniifr::Daemon::tracefile(), and Omniifr::Daemon::~Daemon().


Generated on Fri Mar 4 13:03:32 2005 for OmniIFR by  doxygen 1.4.1