NCBI C++ ToolKit
Public Types | Static Public Member Functions | List of all members

Search Toolkit Book for CSignal

CSignal –. More...

#include <corelib/ncbi_signal.hpp>

Public Types

enum  ESignal {
  eSignal_HUP = (1<<1) , eSignal_INT = (1<<2) , eSignal_QUIT = (1<<3) , eSignal_ILL = (1<<4) ,
  eSignal_FPE = (1<<5) , eSignal_ABRT = (1<<6) , eSignal_SEGV = (1<<7) , eSignal_PIPE = (1<<8) ,
  eSignal_TERM = (1<<9) , eSignal_USR1 = (1<<10) , eSignal_USR2 = (1<<11) , eSignal_Any = 0xfffffff
}
 
typedef int TSignalMask
 Binary OR of "ESignal". More...
 

Static Public Member Functions

static void TrapSignals (TSignalMask signals)
 Sets interrupt signal handling. More...
 
static TSignalMask Reset (void)
 Reset the list of handled signal. More...
 
static bool IsSignaled (TSignalMask signals=eSignal_Any)
 Check that any of specified signals is received. More...
 
static TSignalMask GetSignals (void)
 Get signals state. More...
 
static TSignalMask ClearSignals (TSignalMask signals=eSignal_Any)
 Clear signals state. More...
 
static bool Raise (ESignal signal)
 Sends a signal to the current process. More...
 

Detailed Description

CSignal –.

Setup interrupt signal handling.

Note
Windows: The SIGINT cannot be cough by handler, except it was explicitly generated by calling raise(). The SIGILL, SIGSEGV, and SIGTERM signals are not generated under Windows NT. They are included for ANSI compatibility. Thus you can set signal handlers for these signals, and you can also explicitly generate these signals by calling raise().
Signal settings are not preserved in spawned processes, they resets to the default in the each child process.

Definition at line 66 of file ncbi_signal.hpp.


The documentation for this class was generated from the following file:
Modified on Sun Apr 14 05:27:42 2024 by modify_doxy.py rev. 669887