From: Patrik Gornicz Date: Wed, 9 Sep 2009 03:41:18 +0000 (-0400) Subject: cleaned signal handler X-Git-Url: http://gitweb.pgornicz.com/?a=commitdiff_plain;h=d69b9b95490f9975ee9d4ebdda3c7db5b06d37f5;p=libbear.git cleaned signal handler --- diff --git a/physics/src/config/reader.cpp b/physics/src/config/reader.cpp index 86afa68..0802328 100644 --- a/physics/src/config/reader.cpp +++ b/physics/src/config/reader.cpp @@ -63,7 +63,7 @@ void readConfigs() if( !file.is_open() ) { cerr << "Unable to open file " << fileName << "." << endl; - exit(1); + exit(1); // TODO } while(true) diff --git a/physics/src/handleSignal.cpp b/physics/src/handleSignal.cpp index cd1fcec..d8b3ed9 100644 --- a/physics/src/handleSignal.cpp +++ b/physics/src/handleSignal.cpp @@ -55,10 +55,10 @@ void sighandler( int iSig ) std::cerr << "SIGINT caught" << std::endl; break; default: - std::cout << "UNKNOWN caught"; + std::cerr << "UNKNOWN caught (" << iSig << ")" << std::endl; + break; } - // normally an abort is better ... but this is just SIGINT - exit(iSig); + abort(); #endif // __WIN32__ }