OW_NAMESPACE::Platform Namespace Reference


Namespaces

namespace  Signal

Typedefs

typedef void(* sighandler_t )(int)
typedef void(* full_sighandler_t )(int, siginfo_t *, void *)

Enumerations

enum  { DAEMONIZE_SUCCESS, DAEMONIZE_FAIL }
enum  { SHUTDOWN, REINIT }

Functions

static void theSigHandler (int sig, siginfo_t *info, void *context)
void handleSignal (int sig)
void setupSigHandler (bool dbgFlg)
void daemonInit (int argc, char *argv[])
void daemonize (bool dbgFlg, const String &daemonName, const ServiceEnvironmentIFCRef &env)
 
Exceptions:
DaemonException on error

int daemonShutdown (const String &daemonName, const ServiceEnvironmentIFCRef &env)
void rerunDaemon ()
 Re-run the daemon.
void restartDaemon ()
 Restart the daemon.
void handleSignalAux (int sig, sighandler_t handler)
void handleSignalAux (int sig, full_sighandler_t handler)
void handleSignal (int sig)
void ignoreSignal (int sig)
static void fatalSigHandler (int sig, siginfo_t *info, void *context)
void setupSigHandler (bool dbgFlg)
void installFatalSignalHandlers ()
void removeFatalSignalHandlers ()
void initDaemonizePipe ()
void sendDaemonizeStatus (int status)
void initSig ()
void pushSig (const Signal::SignalInformation &sig)
int popSig (Signal::SignalInformation &sig)
void shutdownSig ()
SelectableIFCRef getSigSelectable ()

Variables

const String COMPONENT_NAME ("ow.owcimomd")
const int DAEMONIZE_PIPE_TIMEOUT = 25
UnnamedPipeRef plat_upipe
UnnamedPipeRef daemonize_upipe
char ** g_argv = 0


Typedef Documentation

typedef void(* OW_NAMESPACE::Platform::full_sighandler_t)(int, siginfo_t *, void *) [static]
 

Definition at line 432 of file OW_Platform.cpp.

typedef void(* OW_NAMESPACE::Platform::sighandler_t)(int) [static]
 

Definition at line 398 of file OW_Platform.cpp.


Enumeration Type Documentation

anonymous enum
 

Enumerator:
DAEMONIZE_SUCCESS 
DAEMONIZE_FAIL 

Definition at line 53 of file OW_Platform.hpp.

anonymous enum
 

Enumerator:
SHUTDOWN 
REINIT 

Definition at line 58 of file OW_Platform.hpp.


Function Documentation

OW_CIMOMSERVER_API void OW_NAMESPACE::Platform::daemonInit int  argc,
char *  argv[]
 

Definition at line 139 of file OW_Platform.cpp.

References g_argv.

Referenced by processCommandLine().

OW_CIMOMSERVER_API void OW_NAMESPACE::Platform::daemonize bool  dbgFlg,
const String &  daemonName,
const ServiceEnvironmentIFCRef env
 

Exceptions:
DaemonException on error

Definition at line 148 of file OW_Platform.cpp.

References OW_NAMESPACE::ConfigOpts::DROP_ROOT_PRIVILEGES_opt, env, initDaemonizePipe(), OW_DEFAULT_DROP_ROOT_PRIVILEGES, and OW_THROW_ERRNO_MSG.

Referenced by main().

OW_CIMOMSERVER_API int OW_NAMESPACE::Platform::daemonShutdown const String &  daemonName,
const ServiceEnvironmentIFCRef env
 

Definition at line 282 of file OW_Platform.cpp.

References env, OW_DEFAULT_PIDFILE, OW_NAMESPACE::ConfigOpts::PIDFILE_opt, OW_NAMESPACE::PidFile::removePid(), and shutdownSig().

static void OW_NAMESPACE::Platform::fatalSigHandler int  sig,
siginfo_t *  info,
void *  context
[static]
 

Definition at line 522 of file OW_Platform.cpp.

References rerunDaemon().

Referenced by installFatalSignalHandlers().

OW_CIMOMSERVER_API SelectableIFCRef OW_NAMESPACE::Platform::getSigSelectable  ) 
 

Definition at line 759 of file OW_Platform.cpp.

References plat_upipe.

Referenced by OW_NAMESPACE::CIMOMEnvironment::runSelectEngine().

void OW_NAMESPACE::Platform::@1::handleSignal int  sig  )  [static]
 

Definition at line 466 of file OW_Platform.cpp.

References handleSignalAux(), and theSigHandler().

void OW_NAMESPACE::Platform::@0::handleSignal int  sig  )  [static]
 

Referenced by setupSigHandler().

void OW_NAMESPACE::Platform::@1::handleSignalAux int  sig,
full_sighandler_t  handler
[static]
 

Definition at line 439 of file OW_Platform.cpp.

void OW_NAMESPACE::Platform::@1::handleSignalAux int  sig,
sighandler_t  handler
[static]
 

Definition at line 402 of file OW_Platform.cpp.

Referenced by handleSignal(), ignoreSignal(), installFatalSignalHandlers(), and removeFatalSignalHandlers().

void OW_NAMESPACE::Platform::@1::ignoreSignal int  sig  )  [static]
 

Definition at line 471 of file OW_Platform.cpp.

References handleSignalAux().

Referenced by setupSigHandler().

OW_CIMOMSERVER_API void OW_NAMESPACE::Platform::initDaemonizePipe  ) 
 

Definition at line 708 of file OW_Platform.cpp.

References DAEMONIZE_PIPE_TIMEOUT, and daemonize_upipe.

Referenced by daemonize().

OW_CIMOMSERVER_API void OW_NAMESPACE::Platform::initSig  ) 
 

Definition at line 724 of file OW_Platform.cpp.

References plat_upipe.

OW_CIMOMSERVER_API void OW_NAMESPACE::Platform::installFatalSignalHandlers  ) 
 

Definition at line 663 of file OW_Platform.cpp.

References fatalSigHandler(), and handleSignalAux().

Referenced by main().

OW_CIMOMSERVER_API int OW_NAMESPACE::Platform::popSig Signal::SignalInformation &  sig  ) 
 

Definition at line 739 of file OW_Platform.cpp.

References plat_upipe, and OW_NAMESPACE::Platform::Signal::unflattenSignalInformation().

OW_CIMOMSERVER_API void OW_NAMESPACE::Platform::pushSig const Signal::SignalInformation &  sig  ) 
 

Definition at line 730 of file OW_Platform.cpp.

References OW_NAMESPACE::Platform::Signal::flattenSignalInformation(), and plat_upipe.

Referenced by theSigHandler().

OW_CIMOMSERVER_API void OW_NAMESPACE::Platform::removeFatalSignalHandlers  ) 
 

Definition at line 676 of file OW_Platform.cpp.

References handleSignalAux().

OW_CIMOMSERVER_API void OW_NAMESPACE::Platform::rerunDaemon  ) 
 

Re-run the daemon.

This closes all file handles and then calls execv to replace the current process with a new copy of the daemon. precondition: daemonInit() must have been called previously, because the same set of arguments will be passed to execv().

This function does not return.

Exceptions:
DaemonException in the case execv() fails.

Definition at line 307 of file OW_Platform.cpp.

References g_argv, i, and OW_THROW_ERRNO_MSG.

Referenced by fatalSigHandler(), main(), and restartDaemon().

OW_CIMOMSERVER_API void OW_NAMESPACE::Platform::restartDaemon  ) 
 

Restart the daemon.

This initiates the restart process. On POSIX platforms, it just sends a SIGHUP to the main process.

Definition at line 382 of file OW_Platform.cpp.

References rerunDaemon().

Referenced by owcimomd_new_handler().

OW_CIMOMSERVER_API void OW_NAMESPACE::Platform::sendDaemonizeStatus int  status  ) 
 

Definition at line 715 of file OW_Platform.cpp.

References daemonize_upipe.

void OW_NAMESPACE::Platform::@2::setupSigHandler bool  dbgFlg  )  [static]
 

Definition at line 566 of file OW_Platform.cpp.

References handleSignal(), ignoreSignal(), and OW_THROW.

void OW_NAMESPACE::Platform::@0::setupSigHandler bool  dbgFlg  )  [static]
 

OW_CIMOMSERVER_API void OW_NAMESPACE::Platform::shutdownSig  ) 
 

Definition at line 753 of file OW_Platform.cpp.

References plat_upipe.

Referenced by daemonShutdown().

static void OW_NAMESPACE::Platform::theSigHandler int  sig,
siginfo_t *  info,
void *  context
[static]
 

Definition at line 483 of file OW_Platform.cpp.

References OW_NAMESPACE::Platform::Signal::extractSignalInformation(), pushSig(), REINIT, SHUTDOWN, and OW_NAMESPACE::Platform::Signal::SignalInformation::signalAction.

Referenced by handleSignal().


Variable Documentation

const String OW_NAMESPACE::Platform::COMPONENT_NAME("ow.owcimomd") [static]
 

const int OW_NAMESPACE::Platform::DAEMONIZE_PIPE_TIMEOUT = 25 [static]
 

Definition at line 114 of file OW_Platform.cpp.

Referenced by initDaemonizePipe().

UnnamedPipeRef OW_NAMESPACE::Platform::daemonize_upipe [static]
 

Definition at line 121 of file OW_Platform.cpp.

Referenced by initDaemonizePipe(), and sendDaemonizeStatus().

char** OW_NAMESPACE::Platform::g_argv = 0 [static]
 

Definition at line 123 of file OW_Platform.cpp.

Referenced by daemonInit(), and rerunDaemon().

UnnamedPipeRef OW_NAMESPACE::Platform::plat_upipe [static]
 

Definition at line 119 of file OW_Platform.cpp.

Referenced by getSigSelectable(), initSig(), popSig(), pushSig(), and shutdownSig().


Generated on Thu Feb 9 09:18:00 2006 for openwbem by  doxygen 1.4.6