Sierra Toolkit  Version of the Day
Signal.hpp
Go to the documentation of this file.
1 /*--------------------------------------------------------------------*/
2 /* Copyright 2003 Sandia Corporation. */
3 /* Under the terms of Contract DE-AC04-94AL85000, there is a */
4 /* non-exclusive license for use of this work by or on behalf */
5 /* of the U.S. Government. Export of this program may require */
6 /* a license from the United States Government. */
7 /*--------------------------------------------------------------------*/
8 
9 #ifndef STK_UTIL_DIAG_Signal_hpp
10 #define STK_UTIL_DIAG_Signal_hpp
11 
12 #include <string>
13 
14 #include <setjmp.h>
15 
31 namespace sierra {
32 namespace Env {
33 
38 
43 void activate_signals();
44 
49 void deactivate_signals();
50 
61 sigjmp_buf *get_sigjmpbuf();
62 
63 // /**
64 // * @brief Function <b>disable_siglongjmp</b> disables the long jump buffer. When
65 // * signals are received, they return to the caller without long jumping to the set jump point.
66 // *
67 // */
68 // void disable_siglongjmp();
69 
77 const std::string &get_signal_message();
78 
84 bool HUP_received();
85 
93 bool shutdown_requested();
94 
98 
99 } // namespace Env
100 } // namespace sierra
101 
102 #endif // STK_UTIL_DIAG_Signal_hpp
Definition: Env.cpp:53
sigjmp_buf * get_sigjmpbuf()
Function get_sigjmpbuf enables signal handling and returns a pointer to the jump buffer for ::sigsetj...
Definition: Signal.cpp:257
bool shutdown_requested()
Function shutdown_requested returns true if an application shutdown has requested via the request_shu...
bool HUP_received()
Function request_shutdown sets the shutdown requested flag so that future calls to shutdown_requested...
Definition: Signal.cpp:278
const std::string & get_signal_message()
Function disable_siglongjmp disables the long jump buffer. When signals are received, they return to the caller without long jumping to the set jump point.
Definition: Signal.cpp:271
void deactivate_signals()
Function deactivate_signals disables the signal handlers.
Definition: Signal.cpp:250
void activate_signals()
Function activate_signals enables the signal handlers.
Definition: Signal.cpp:243