oasys::FatalSignals Class Reference

#include <FatalSignals.h>

List of all members.


Detailed Description

Definition at line 22 of file FatalSignals.h.

Static Public Member Functions

static void init (const char *appname)
 Set up the debugging stack dump handler for all fatal signals.
static void cancel ()
 Cancel registered fatal handlers.
static void set_core_dir (const char *dir)
 Set the directory to chdir to before dumping core in the case of a fatal signal.
static void die () __attribute__((noreturn))
 Print a stack trace and die.

Static Protected Member Functions

static void handler (int sig)
 Fatal signal handler.

Static Protected Attributes

static const char * appname_
 The app name to put in the stack trace printout.
static const char * core_dir_
 The directory to chdir() into before dumping core.
static bool in_abort_handler_
 Flag set in the abort/quit handler when we deliver the signal to other threads.


Member Function Documentation

void oasys::FatalSignals::init ( const char *  appname  )  [static]

Set up the debugging stack dump handler for all fatal signals.

Definition at line 36 of file FatalSignals.cc.

References appname_, and handler().

Referenced by oasys::UnitTester::init(), and dtn::DTND::main().

void oasys::FatalSignals::cancel (  )  [static]

Cancel registered fatal handlers.

Definition at line 48 of file FatalSignals.cc.

Referenced by die().

static void oasys::FatalSignals::set_core_dir ( const char *  dir  )  [inline, static]

Set the directory to chdir to before dumping core in the case of a fatal signal.

Definition at line 38 of file FatalSignals.h.

References core_dir_.

void oasys::FatalSignals::die (  )  [static]

Print a stack trace and die.

Definition at line 128 of file FatalSignals.cc.

References oasys::Breaker::break_here(), cancel(), core_dir_, and oasys::StackTrace::print_current_trace().

void oasys::FatalSignals::handler ( int  sig  )  [static, protected]

Fatal signal handler.

Definition at line 59 of file FatalSignals.cc.

References oasys::Thread::all_threads_, appname_, core_dir_, oasys::Thread::current(), FATAL, in_abort_handler_, oasys::Thread::max_live_threads_, oasys::StackTrace::print_current_trace(), and snprintf().

Referenced by init().


Member Data Documentation

const char * oasys::FatalSignals::appname_ [static, protected]

The app name to put in the stack trace printout.

Definition at line 53 of file FatalSignals.h.

Referenced by handler(), and init().

const char * oasys::FatalSignals::core_dir_ [static, protected]

The directory to chdir() into before dumping core.

Definition at line 56 of file FatalSignals.h.

Referenced by die(), handler(), and set_core_dir().

bool oasys::FatalSignals::in_abort_handler_ [static, protected]

Flag set in the abort/quit handler when we deliver the signal to other threads.

Definition at line 60 of file FatalSignals.h.

Referenced by handler().


The documentation for this class was generated from the following files:
Generated on Thu Jun 7 12:54:35 2007 for DTN Reference Implementation by  doxygen 1.5.1