ALPSCore reference
Public Member Functions | Static Public Member Functions | List of all members
alps::signal Class Reference

#include <signal.hpp>

Collaboration diagram for alps::signal:
Collaboration graph

Public Member Functions

 signal ()
 
bool empty () const
 
int top () const
 
void pop ()
 

Static Public Member Functions

static void listen ()
 
static void slot (int signal)
 
static void segfault (int signal)
 

Detailed Description

Definition at line 18 of file signal.hpp.

Constructor & Destructor Documentation

alps::signal::signal ( )

Listen to the following posix signals SIGINT, SIGTERM, SIGXCPU, SIGQUIT, SIGUSR1, SIGUSR2, SIGSTOP SIGKILL. Those signals can be check by empty, top, pop

embed:rst
.. note::
   If a SIGSEGV (segfault) or SIGBUS (bus error) occures, a stacktrace
   is printed an all open hdf5 archives are closed before it exits.

Definition at line 22 of file signal.cpp.

Member Function Documentation

bool alps::signal::empty ( ) const

Returns if a signal has been captured.

Definition at line 42 of file signal.cpp.

void alps::signal::listen ( )
static

Listen to the signals SIGSEGV (segfault) and SIGBUS (bus error). If one of these signals are captured, a stacktrace is printed an all open hdf5 archives are closed before it exits.

Definition at line 54 of file signal.cpp.

void alps::signal::pop ( )

Pops a signal form the stack.

Definition at line 50 of file signal.cpp.

void alps::signal::segfault ( int  signal)
static

Definition at line 77 of file signal.cpp.

void alps::signal::slot ( int  signal)
static

Definition at line 69 of file signal.cpp.

int alps::signal::top ( ) const

Returns the last signal that has been captured .

Definition at line 46 of file signal.cpp.


The documentation for this class was generated from the following files: