aboutsummaryrefslogtreecommitdiffstats
path: root/include/inspircd.h
diff options
context:
space:
mode:
authorGravatar Sadie Powell2026-06-19 16:25:36 +0100
committerGravatar Sadie Powell2026-06-19 16:43:54 +0100
commitebcce68b6095ca9766641ce5dc00aae01d61de06 (patch)
tree1031bb5de5cbfd3be5ce37470d593bbe30154c95 /include/inspircd.h
parentRework error reporting and shutting down. (diff)
Move server restart logic to the core.
- Properly clean up the process with Cleanup() instead of using - DieRestart. - Use close_range on modern Linux instead of the CLOEXEC hack.
Diffstat (limited to 'include/inspircd.h')
-rw-r--r--include/inspircd.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/inspircd.h b/include/inspircd.h
index 470500f64..6c653f04e 100644
--- a/include/inspircd.h
+++ b/include/inspircd.h
@@ -396,6 +396,13 @@ public:
[[noreturn]]
static void QuickExit(int status, const std::string& reason = "", const std::string& logtype = "");
+ /** Causes the server to restart after unloading modules and closing all open file descriptors.
+ * @param reason If non-empty then the reason the server is exiting.
+ * @param logtype If non-empty then the log type to log the exit reason as.
+ * @return If this function returns then the restart failed and the return value contains the reason why.
+ */
+ std::string Restart(const std::string& reason = "", const std::string& logtype = "");
+
/** Stores an incoming signal when received from the operating system.
* @param signal The signal received from the operating system.
*/