]> arthur.barton.de Git - ngircd-alex.git/blobdiff - src/ngircd/sighandlers.c
Merge branch 'bug92-xop'
[ngircd-alex.git] / src / ngircd / sighandlers.c
index b8e8013d31c2671143babc96724912d40ab9a769..a219105f4b5aff571e045f22d58f0f5fc4d17162 100644 (file)
@@ -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- */