From eadd5cce87ff5d17a3506bc0750e21e3d5035143 Mon Sep 17 00:00:00 2001 From: peavey Date: Wed, 25 Jul 2007 19:46:25 +0000 Subject: Rehash from console works again due to new signalhandler. TODO: Use this to catch SIGTERM and exit cleanly. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7571 e03df62e-2008-0410-955e-edbf42e46eb7 --- include/inspircd.h | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/inspircd.h b/include/inspircd.h index 13b66ade7..fff30df9f 100644 --- a/include/inspircd.h +++ b/include/inspircd.h @@ -62,8 +62,6 @@ */ #define IS_SINGLE(x,y) ( (*x == y) && (*(x+1) == 0) ) - - /** Delete a pointer, and NULL its value */ template inline void DELETE(T* x) @@ -490,6 +488,10 @@ class CoreExport InspIRCd : public classbase */ time_t next_call; + /** Set to the current signal recieved + */ + int s_signal; + /** Get the current time * Because this only calls time() once every time around the mainloop, * it is much faster than calling time() directly. @@ -674,9 +676,18 @@ class CoreExport InspIRCd : public classbase bool IsChannel(const char *chname); /** Rehash the local server - * @param status This value is unused, and required for signal handler functions */ - static void Rehash(int status); + void Rehash(); + + /** Handles incoming signals after being set + * @param signal the signal recieved + */ + void SignalHandler(int signal); + + /** Sets the signal recieved + * @param signal the signal recieved + */ + static void SetSignal(int signal); /** Causes the server to exit after unloading modules and * closing all open file descriptors. -- cgit v1.2.3