X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=ngircd-alex.git;a=blobdiff_plain;f=src%2Fngircd%2Fsighandlers.c;h=a219105f4b5aff571e045f22d58f0f5fc4d17162;hp=b8e8013d31c2671143babc96724912d40ab9a769;hb=e3e181f4b3eae0e552632bce19bdff990196938f;hpb=4a770e8e2deaa90bd99edd8132de09f778158a87 diff --git a/src/ngircd/sighandlers.c b/src/ngircd/sighandlers.c index b8e8013d..a219105f 100644 --- a/src/ngircd/sighandlers.c +++ b/src/ngircd/sighandlers.c @@ -218,8 +218,11 @@ Signal_Handler_BH(int Signal) break; #ifdef DEBUG case SIGUSR2: - if (NGIRCd_Debug) + if (NGIRCd_Debug) { + Log(LOG_INFO|LOG_snotice, + "Got SIGUSR2, dumping internal state ..."); Dump_State(); + } break; default: Log(LOG_DEBUG, "Got signal %d! Ignored.", Signal); @@ -236,7 +239,7 @@ Signal_Callback(int fd, short UNUSED what) (void) what; do { - ret = read(fd, &sig, sizeof(sig)); + ret = (int)read(fd, &sig, sizeof(sig)); if (ret == sizeof(int)) Signal_Handler_BH(sig); } while (ret == sizeof(int)); @@ -331,6 +334,7 @@ Signals_Exit(void) #endif close(signalpipe[1]); close(signalpipe[0]); + signalpipe[0] = signalpipe[1] = 0; } /* -eof- */