From: Patrik Gornicz Date: Thu, 22 Jan 2009 01:32:04 +0000 (-0500) Subject: refactored handleSignal X-Git-Tag: physics-premerge~50 X-Git-Url: http://gitweb.pgornicz.com/gitweb.cgi?a=commitdiff_plain;h=a24bceeac654935fa0894317dd04e1ab39df5d50;p=libbear.git 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__ }