From d69b9b95490f9975ee9d4ebdda3c7db5b06d37f5 Mon Sep 17 00:00:00 2001 From: Patrik Gornicz Date: Tue, 8 Sep 2009 23:41:18 -0400 Subject: [PATCH] cleaned signal handler --- physics/src/config/reader.cpp | 2 +- physics/src/handleSignal.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) 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__ } -- 2.10.2