commit - 1438771124ed4730aca2d722595166e31ecd88c5
commit + 3e723318961b452c851eda2bec2a322fc249bfce
blob - 8f0a5a1b8cd3c8b1fd4a193af8a7c38119d21315
blob + 6d5ea8f83b9a97727727f39d0665e4be695cf241
--- src/ngircd/sighandlers.c
+++ src/ngircd/sighandlers.c
/*
* 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
* it under the terms of the GNU General Public License as published by
SIGINT, SIGQUIT, SIGTERM, SIGHUP, SIGCHLD, SIGUSR1, SIGUSR2
};
-
#ifdef DEBUG
static void
#endif
-
static void
Signal_Block(int sig)
{
#endif
}
-
static void
Signal_Unblock(int sig)
{
#endif
}
-
/**
* Reload the server configuration file.
*/
* be changed during run-time */
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.");
+ Log(LOG_ERR,
+ "Can't change \"ServerName\" on runtime! Ignored new name.");
}
if (old_nicklen != Conf_MaxNickLength) {
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 */
Channel_InitPredefined( );
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 */
Conn_InitListeners( );
Log( LOG_NOTICE|LOG_snotice, "Re-reading of configuration done." );
} /* Rehash */
-
/**
* Signal handler of ngIRCd.
* This function is called whenever ngIRCd catches a signal sent by the
Signal_Block(Signal);
} /* Signal_Handler */
-
/**
* Signal processing handler of ngIRCd.
* This function is called from the main conn event loop in (io_dispatch)
Signal_Unblock(Signal);
}
-
static void
Signal_Callback(int fd, short UNUSED what)
{
if (errno == EAGAIN || errno == EINTR)
return;
- Log(LOG_EMERG, "read from signal pipe: %s", strerror(errno));
+ Log(LOG_EMERG, "Read from signal pipe: %s - Exiting!",
+ strerror(errno));
exit(1);
}
- Log(LOG_EMERG, "EOF on signal pipe");
+ Log(LOG_EMERG, "EOF on signal pipe!? - Exiting!");
exit(1);
}
-
/**
* Initialize the signal handlers, catch
* those signals we are interested in and sets SIGPIPE to be ignored.
return io_event_create(signalpipe[0], IO_WANTREAD, Signal_Callback);
} /* Signals_Init */
-
/**
* Restores signals to their default behaviour.
*