Changeset 2662 for code/trunk/src/util/SignalHandler.cc
- Timestamp:
- Feb 14, 2009, 10:17:35 PM (16 years ago)
- Location:
- code/trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
-
code/trunk/src/util
- Property svn:mergeinfo changed
/code/branches/network/src/util (added) merged: 2356 /code/branches/network64/src/util (added) merged: 2245 /code/branches/objecthierarchy2/src/util (added) merged: 2257,2259,2343-2345,2361 /code/branches/overlay/src/util (added) merged: 2180 /code/branches/physics/src/util (added) merged: 2192,2298,2305,2424 /code/branches/physics_merge/src/util (added) merged: 2442 /code/branches/pickups2/src/util (added) merged: 2136 /code/branches/presentation/src/util (added) merged: 2371,2420,2459,2485,2492-2493,2500,2535,2541-2542,2560
- Property svn:mergeinfo changed
-
code/trunk/src/util/SignalHandler.cc
- Property svn:mergeinfo changed
/code/branches/core3/src/orxonox/SignalHandler.cc reverse-merged: 1607,1678 /code/branches/network/src/util/SignalHandler.cc (added) merged: 2356 /code/branches/objecthierarchy2/src/util/SignalHandler.cc (added) merged: 2344-2345 /code/branches/physics_merge/src/util/SignalHandler.cc (added) merged: 2442 /code/branches/presentation/src/util/SignalHandler.cc (added) merged: 2371,2420,2459,2485,2492-2493,2500 /code/trunk/src/util/SignalHandler.cc (added) merged: 2-2085
r2261 r2662 35 35 #include "Debug.h" 36 36 37 #include <cassert>38 37 #include <iostream> 39 38 #include <cstdlib> … … 42 41 namespace orxonox 43 42 { 44 SignalHandler * SignalHandler::singletonRef= NULL;43 SignalHandler* SignalHandler::singletonRef_s = NULL; 45 44 } 46 45 … … 55 54 { 56 55 bool SignalHandler::bXAutoKeyRepeatOn_ = false; 57 58 SignalHandler::SignalHandler()59 {60 }61 56 62 57 /** … … 133 128 void SignalHandler::sigHandler( int sig ) 134 129 { 135 for ( SignalCallbackList::iterator it = SignalHandler::getInstance() ->callbackList.begin(); it != SignalHandler::getInstance()->callbackList.end(); it++ )130 for ( SignalCallbackList::iterator it = SignalHandler::getInstance().callbackList.begin(); it != SignalHandler::getInstance().callbackList.end(); it++ ) 136 131 { 137 132 (*(it->cb))( it->someData ); … … 184 179 if ( sigPid == 0 ) 185 180 { 186 getInstance() ->dontCatch();181 getInstance().dontCatch(); 187 182 // wait for message from parent when it has attached gdb 188 183 int someData; … … 237 232 238 233 char cmd[256]; 239 snprintf( cmd, 256, "file %s\nattach %d\nc\n", getInstance() ->appName.c_str(), sigPid );234 snprintf( cmd, 256, "file %s\nattach %d\nc\n", getInstance().appName.c_str(), sigPid ); 240 235 write( gdbIn[1], cmd, strlen(cmd) ); 241 236 … … 331 326 bt.insert(0, timeString); 332 327 333 FILE * f = fopen( getInstance() ->filename.c_str(), "a" );328 FILE * f = fopen( getInstance().filename.c_str(), "a" ); 334 329 335 330 if ( !f ) 336 331 { 337 perror( ( std::string( "could not append to " ) + getInstance() ->filename ).c_str() );332 perror( ( std::string( "could not append to " ) + getInstance().filename ).c_str() ); 338 333 exit(EXIT_FAILURE); 339 334 } … … 341 336 if ( fwrite( bt.c_str(), 1, bt.length(), f ) != bt.length() ) 342 337 { 343 COUT(0) << "could not write " << bt.length() << " byte to " << getInstance() ->filename << std::endl;338 COUT(0) << "could not write " << bt.length() << " byte to " << getInstance().filename << std::endl; 344 339 exit(EXIT_FAILURE); 345 340 } - Property svn:mergeinfo changed
Note: See TracChangeset
for help on using the changeset viewer.