From: Patrik Gornicz Date: Thu, 22 Jan 2009 01:32:04 +0000 (-0500) Subject: refactored handleSignal X-Git-Tag: v0.10~9 X-Git-Url: http://gitweb.pgornicz.com/gitweb.cgi?p=physics.git;a=commitdiff_plain;h=a24bceeac654935fa0894317dd04e1ab39df5d50 refactored handleSignal --- diff --git a/src/handleSignal.cpp b/src/handleSignal.cpp index fa5a8c4..cd1fcec 100644 --- a/src/handleSignal.cpp +++ b/src/handleSignal.cpp @@ -23,7 +23,7 @@ /// ***** Private Method Headers ***** -void sighandler( int sig ); +static void sighandler( int iSig ); /// ***** Public Methods ***** @@ -46,10 +46,10 @@ void installSignal() /// ***** Private Methods ***** // signal handler function -void sighandler( int sig ) +void sighandler( int iSig ) { #ifndef __WIN32__ - switch(sig) + switch(iSig) { case SIGINT: std::cerr << "SIGINT caught" << std::endl; @@ -59,6 +59,6 @@ void sighandler( int sig ) } // normally an abort is better ... but this is just SIGINT - exit(sig); + exit(iSig); #endif // __WIN32__ }