]> jfr.im git - solanum.git/blobdiff - ircd/ircd_signal.c
doc/reference.conf: document the auth::umodes configuration option
[solanum.git] / ircd / ircd_signal.c
index 37a042d6e5e543d889564996ab90056efdd5c159..22472529d6890ef1600486aabd6d924e52f46a33 100644 (file)
@@ -16,8 +16,6 @@
  *   You should have received a copy of the GNU General Public License
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- * $Id: ircd_signal.c 6 2005-09-10 01:02:21Z nenolod $
  */
 
 #include "stdinc.h"
@@ -28,6 +26,8 @@
 #include "s_conf.h"
 #include "client.h"
 #include "send.h"
+#include <sys/types.h>
+#include <sys/wait.h>
 
 /*
  * dummy_handler - don't know if this is really needed but if alarm is still
@@ -54,6 +54,9 @@ sigchld_handler(int sig)
 /*
  * sigterm_handler - exit the server
  */
+static void
+sigterm_handler(int sig) __attribute__((noreturn));
+
 static void
 sigterm_handler(int sig)
 {
@@ -66,7 +69,7 @@ sigterm_handler(int sig)
 static void
 sighup_handler(int sig)
 {
-       dorehash = 1;
+       dorehash = true;
 }
 
 /*
@@ -75,13 +78,13 @@ sighup_handler(int sig)
 static void
 sigusr1_handler(int sig)
 {
-       doremotd = 1;
+       doremotd = true;
 }
 
 static void
 sigusr2_handler(int sig)
 {
-       dorehashbans = 1;
+       dorehashbans = true;
 }
 
 /*
@@ -90,7 +93,7 @@ sigusr2_handler(int sig)
 static void
 sigint_handler(int sig)
 {
-       static int restarting = 0;
+       static bool restarting = false;
 
        if(server_state_foreground)
        {
@@ -100,9 +103,9 @@ sigint_handler(int sig)
        else
        {
                ilog(L_MAIN, "Server Restarting on SIGINT");
-               if(restarting == 0)
+               if(!restarting)
                {
-                       restarting = 1;
+                       restarting = true;
                        server_reboot();
                }
        }