summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorpeavey <peavey@e03df62e-2008-0410-955e-edbf42e46eb7>2007-07-25 19:46:25 +0000
committerpeavey <peavey@e03df62e-2008-0410-955e-edbf42e46eb7>2007-07-25 19:46:25 +0000
commiteadd5cce87ff5d17a3506bc0750e21e3d5035143 (patch)
tree88c7b53402a664e927a3a22ab88414bab3f79eb0 /include
parentc39ccd1fdaef9ac6fd62888badc0240e8a88c55a (diff)
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
Diffstat (limited to 'include')
-rw-r--r--include/inspircd.h19
1 files changed, 15 insertions, 4 deletions
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<typename T> 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.