Log( LOG_NOTICE|LOG_snotice, "Re-reading configuration NOW!" );
- /* Remember old server name and nick name length */
+ /* Remember old server name and nickname length */
strlcpy( old_name, Conf_ServerName, sizeof old_name );
old_nicklen = Conf_MaxNickLength;
/* Close down all listening sockets */
Conn_ExitListeners( );
- /* Recover old server name and nick name length: these values can't
+ /* Recover old server name and nickname length: these values can't
* be changed during run-time */
if (strcmp(old_name, Conf_ServerName) != 0 ) {
strlcpy(Conf_ServerName, old_name, sizeof Conf_ServerName);
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);
(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));
sigaction(SIGPIPE, &saction, NULL);
#else
for (i=0; i < C_ARRAY_SIZE(signals_catch) ; i++)
- sigaction(signals_catch[i], &saction, NULL);
+ signal(signals_catch[i], SIG_DFL);
signal(SIGPIPE, SIG_DFL);
#endif
close(signalpipe[1]);
close(signalpipe[0]);
+ signalpipe[0] = signalpipe[1] = 0;
}
/* -eof- */