mirror of
https://github.com/osmarks/ngircd.git
synced 2025-03-05 17:08:10 +00:00
sighandlers.c: Update some log messages
This commit is contained in:
parent
1438771124
commit
3e72331896
@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* ngIRCd -- The Next Generation IRC Daemon
|
* ngIRCd -- The Next Generation IRC Daemon
|
||||||
|
* Copyright (c)2001-2013 Alexander Barton (alex@barton.de) and Contributors.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -40,7 +41,6 @@ static const int signals_catch[] = {
|
|||||||
SIGINT, SIGQUIT, SIGTERM, SIGHUP, SIGCHLD, SIGUSR1, SIGUSR2
|
SIGINT, SIGQUIT, SIGTERM, SIGHUP, SIGCHLD, SIGUSR1, SIGUSR2
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -57,7 +57,6 @@ Dump_State(void)
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
Signal_Block(int sig)
|
Signal_Block(int sig)
|
||||||
{
|
{
|
||||||
@ -73,7 +72,6 @@ Signal_Block(int sig)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
Signal_Unblock(int sig)
|
Signal_Unblock(int sig)
|
||||||
{
|
{
|
||||||
@ -90,7 +88,6 @@ Signal_Unblock(int sig)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reload the server configuration file.
|
* Reload the server configuration file.
|
||||||
*/
|
*/
|
||||||
@ -117,18 +114,21 @@ Rehash(void)
|
|||||||
* be changed during run-time */
|
* be changed during run-time */
|
||||||
if (strcmp(old_name, Conf_ServerName) != 0 ) {
|
if (strcmp(old_name, Conf_ServerName) != 0 ) {
|
||||||
strlcpy(Conf_ServerName, old_name, sizeof Conf_ServerName);
|
strlcpy(Conf_ServerName, old_name, sizeof Conf_ServerName);
|
||||||
Log(LOG_ERR, "Can't change \"ServerName\" on runtime! Ignored new name.");
|
Log(LOG_ERR,
|
||||||
|
"Can't change \"ServerName\" on runtime! Ignored new name.");
|
||||||
}
|
}
|
||||||
if (old_nicklen != Conf_MaxNickLength) {
|
if (old_nicklen != Conf_MaxNickLength) {
|
||||||
Conf_MaxNickLength = old_nicklen;
|
Conf_MaxNickLength = old_nicklen;
|
||||||
Log(LOG_ERR, "Can't change \"MaxNickLength\" on runtime! Ignored new value.");
|
Log(LOG_ERR,
|
||||||
|
"Can't change \"MaxNickLength\" on runtime! Ignored new value.");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Create new pre-defined channels */
|
/* Create new pre-defined channels */
|
||||||
Channel_InitPredefined( );
|
Channel_InitPredefined( );
|
||||||
|
|
||||||
if (!ConnSSL_InitLibrary())
|
if (!ConnSSL_InitLibrary())
|
||||||
Log(LOG_WARNING, "Re-Initializing SSL failed, using old keys");
|
Log(LOG_WARNING,
|
||||||
|
"Re-Initializing of SSL failed, using old keys!");
|
||||||
|
|
||||||
/* Start listening on sockets */
|
/* Start listening on sockets */
|
||||||
Conn_InitListeners( );
|
Conn_InitListeners( );
|
||||||
@ -139,7 +139,6 @@ Rehash(void)
|
|||||||
Log( LOG_NOTICE|LOG_snotice, "Re-reading of configuration done." );
|
Log( LOG_NOTICE|LOG_snotice, "Re-reading of configuration done." );
|
||||||
} /* Rehash */
|
} /* Rehash */
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Signal handler of ngIRCd.
|
* Signal handler of ngIRCd.
|
||||||
* This function is called whenever ngIRCd catches a signal sent by the
|
* This function is called whenever ngIRCd catches a signal sent by the
|
||||||
@ -198,7 +197,6 @@ Signal_Handler(int Signal)
|
|||||||
Signal_Block(Signal);
|
Signal_Block(Signal);
|
||||||
} /* Signal_Handler */
|
} /* Signal_Handler */
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Signal processing handler of ngIRCd.
|
* Signal processing handler of ngIRCd.
|
||||||
* This function is called from the main conn event loop in (io_dispatch)
|
* This function is called from the main conn event loop in (io_dispatch)
|
||||||
@ -231,7 +229,6 @@ Signal_Handler_BH(int Signal)
|
|||||||
Signal_Unblock(Signal);
|
Signal_Unblock(Signal);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
Signal_Callback(int fd, short UNUSED what)
|
Signal_Callback(int fd, short UNUSED what)
|
||||||
{
|
{
|
||||||
@ -248,15 +245,15 @@ Signal_Callback(int fd, short UNUSED what)
|
|||||||
if (errno == EAGAIN || errno == EINTR)
|
if (errno == EAGAIN || errno == EINTR)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Log(LOG_EMERG, "read from signal pipe: %s", strerror(errno));
|
Log(LOG_EMERG, "Read from signal pipe: %s - Exiting!",
|
||||||
|
strerror(errno));
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
Log(LOG_EMERG, "EOF on signal pipe");
|
Log(LOG_EMERG, "EOF on signal pipe!? - Exiting!");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initialize the signal handlers, catch
|
* Initialize the signal handlers, catch
|
||||||
* those signals we are interested in and sets SIGPIPE to be ignored.
|
* those signals we are interested in and sets SIGPIPE to be ignored.
|
||||||
@ -306,7 +303,6 @@ Signals_Init(void)
|
|||||||
return io_event_create(signalpipe[0], IO_WANTREAD, Signal_Callback);
|
return io_event_create(signalpipe[0], IO_WANTREAD, Signal_Callback);
|
||||||
} /* Signals_Init */
|
} /* Signals_Init */
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Restores signals to their default behaviour.
|
* Restores signals to their default behaviour.
|
||||||
*
|
*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user