Changeset 3136 for code/branches/netp4/src
- Timestamp:
- Jun 10, 2009, 12:24:06 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/netp4/src/util/SignalHandler.cc
r3068 r3136 107 107 void SignalHandler::sigHandler( int sig ) 108 108 { 109 for ( SignalCallbackList::iterator it = SignalHandler::getInstance().callbackList.begin(); it != SignalHandler::getInstance().callbackList.end(); it++ )110 {111 (*(it->cb))( it->someData );112 }113 114 109 std::string sigName = "UNKNOWN"; 115 110 … … 126 121 break; 127 122 } 123 // if the signalhandler has already been destroyed then don't do anything 124 if( SignalHandler::singletonRef_s == 0 ) 125 { 126 COUT(0) << "recieved signal " << sigName.c_str() << std::endl << "can't write backtrace because SignalHandler already destroyed" << std::endl; 127 exit(EXIT_FAILURE); 128 } 129 130 for ( SignalCallbackList::iterator it = SignalHandler::getInstance().callbackList.begin(); it != SignalHandler::getInstance().callbackList.end(); it++ ) 131 { 132 (*(it->cb))( it->someData ); 133 } 134 128 135 129 136 COUT(0) << "recieved signal " << sigName.c_str() << std::endl << "try to write backtrace to file orxonox_crash.log" << std::endl;
Note: See TracChangeset
for help on using the changeset viewer.