diff options
Diffstat (limited to 'blabouncer.c')
-rw-r--r-- | blabouncer.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/blabouncer.c b/blabouncer.c index 72118ec..c3443dd 100644 --- a/blabouncer.c +++ b/blabouncer.c @@ -510,8 +510,9 @@ void dochat(int *serversockfd, int *clientsockfd, struct settings *settings) { if (pselret < 0) { // Error or signal interrupt if (errno == EINTR) { // Signal caught, do signal handling - debugprint(DEBUG_CRIT, "signal '%d' happened, exiting!\n", signum); + debugprint(DEBUG_CRIT, "signal '%d' received!\n", signum); if (signum == SIGHUP) { // REHASH requested + debugprint(DEBUG_SOME, "SIGHUP received, attempting REHASH!\n"); // TODO - This code is duplicated between here and BLABOUNCER REHASH handling char outgoingmsg[MAXDATASIZE]; char failuremsg[MAXDATASIZE]; @@ -534,10 +535,13 @@ void dochat(int *serversockfd, int *clientsockfd, struct settings *settings) { // Then go back to the top of the loop continue; } else if (signum == SIGINT) { // Probably Ctrl+C + debugprint(DEBUG_CRIT, "SIGINT received, exiting!\n"); cleanexit(server_ssl, clients, 0, &ircdstate, settings, "SIGINT received"); } else if (signum == SIGTERM) { // Probably `kill` + debugprint(DEBUG_CRIT, "SIGTERM received, exiting!\n"); cleanexit(server_ssl, clients, 0, &ircdstate, settings, "SIGTERM received"); } else { + debugprint(DEBUG_CRIT, "Unexpected signal received, exiting!\n"); cleanexit(server_ssl, clients, 0, &ircdstate, settings, "Unexpected signal received"); } } else { |