X-Git-Url: https://www.tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Fprocess.c;h=4626d745ec4b70312761dae2705337ad40b85820;hp=a70d8d28e00d8f77195103e296d5db9ba8a537ee;hb=e310cc82d3f9c9bdb3b827daa149861a41e2e00a;hpb=161f917dd03c174742fb8c6722f430a93b506cb1 diff --git a/src/process.c b/src/process.c index a70d8d28..4626d745 100644 --- a/src/process.c +++ b/src/process.c @@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id: process.c,v 1.1.2.48 2002/09/10 09:40:25 guus Exp $ + $Id: process.c,v 1.1.2.50 2002/09/30 19:04:37 zarq Exp $ */ #include "config.h" @@ -58,7 +58,7 @@ extern char **g_argv; sigset_t emptysigset; -static int saved_debug_lvl = 0; +static int saved_debug_lvl = -1; extern int sighup; extern int sigalrm; @@ -364,15 +364,13 @@ RETSIGTYPE sighup_handler(int a) RETSIGTYPE sigint_handler(int a) { - if(saved_debug_lvl) { + if(saved_debug_lvl != -1) { syslog(LOG_NOTICE, _("Reverting to old debug level (%d)"), saved_debug_lvl); debug_lvl = saved_debug_lvl; - saved_debug_lvl = 0; + saved_debug_lvl = -1; } else { - syslog(LOG_NOTICE, - _ - ("Temporarily setting debug level to 5. Kill me with SIGINT again to go back to level %d."), + syslog(LOG_NOTICE, _("Temporarily setting debug level to 5. Kill me with SIGINT again to go back to level %d."), debug_lvl); saved_debug_lvl = debug_lvl; debug_lvl = 5; @@ -469,9 +467,7 @@ void setup_signals(void) for(i = 0; sighandlers[i].signal; i++) { act.sa_handler = sighandlers[i].handler; if(sigaction(sighandlers[i].signal, &act, NULL) < 0) - fprintf(stderr, - _ - ("Installing signal handler for signal %d (%s) failed: %s\n"), + fprintf(stderr, _("Installing signal handler for signal %d (%s) failed: %s\n"), sighandlers[i].signal, strsignal(sighandlers[i].signal), strerror(errno)); }