X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fngircd%2Fsighandlers.c;h=8275123e6acd433a555f4e130a11faa10205ab47;hb=0d503945cb527e275ef6644a234a6876ff61322b;hp=6d5ea8f83b9a97727727f39d0665e4be695cf241;hpb=65359ff8f722efdf24700ce05011afc0fef28924;p=ngircd-alex.git diff --git a/src/ngircd/sighandlers.c b/src/ngircd/sighandlers.c index 6d5ea8f8..8275123e 100644 --- a/src/ngircd/sighandlers.c +++ b/src/ngircd/sighandlers.c @@ -1,6 +1,6 @@ /* * ngIRCd -- The Next Generation IRC Daemon - * Copyright (c)2001-2013 Alexander Barton (alex@barton.de) and Contributors. + * Copyright (c)2001-2015 Alexander Barton (alex@barton.de) and Contributors. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -24,15 +24,15 @@ #include #include #include +#include -#include "imp.h" #include "conn.h" -#include "conf-ssl.h" #include "channel.h" #include "conf.h" #include "io.h" #include "log.h" #include "ngircd.h" + #include "sighandlers.h" static int signalpipe[2]; @@ -48,7 +48,11 @@ Dump_State(void) { Log(LOG_DEBUG, "--- Internal server state: %s ---", Client_ID(Client_ThisServer())); - Log(LOG_DEBUG, "time()=%ld", time(NULL)); +#ifdef HAVE_LONG_LONG + Log(LOG_DEBUG, "time()=%llu", (unsigned long long)time(NULL)); +#else + Log(LOG_DEBUG, "time()=%lu", (unsigned long)time(NULL)); +#endif Conf_DebugDump(); Conn_DebugDump(); Client_DebugDump(); @@ -115,7 +119,7 @@ Rehash(void) if (strcmp(old_name, Conf_ServerName) != 0 ) { strlcpy(Conf_ServerName, old_name, sizeof Conf_ServerName); Log(LOG_ERR, - "Can't change \"ServerName\" on runtime! Ignored new name."); + "Can't change server name (\"Name\") on runtime! Ignored new name."); } if (old_nicklen != Conf_MaxNickLength) { Conf_MaxNickLength = old_nicklen; @@ -128,7 +132,7 @@ Rehash(void) if (!ConnSSL_InitLibrary()) Log(LOG_WARNING, - "Re-Initializing of SSL failed, using old keys!"); + "Re-Initializing of SSL failed!"); /* Start listening on sockets */ Conn_InitListeners( ); @@ -150,6 +154,14 @@ Rehash(void) static void Signal_Handler(int Signal) { + if (Signal != SIGCHLD) { +#ifdef HAVE_STRSIGNAL + Log(LOG_INFO, "Got signal \"%s\" ...", strsignal(Signal)); +#else + Log(LOG_INFO, "Got signal %d ...", Signal); +#endif + } + switch (Signal) { case SIGTERM: case SIGINT: @@ -257,7 +269,7 @@ Signal_Callback(int fd, short UNUSED what) /** * Initialize the signal handlers, catch * those signals we are interested in and sets SIGPIPE to be ignored. - * @return true if initialization was sucessful. + * @return true if initialization was successful. */ bool Signals_Init(void) @@ -304,7 +316,7 @@ Signals_Init(void) } /* Signals_Init */ /** - * Restores signals to their default behaviour. + * Restores signals to their default behavior. * * This should be called after a fork() in the new * child prodcess, especially when we are about to call