aboutsummaryrefslogtreecommitdiff
path: root/src/server.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2022-07-19 17:00:23 +0100
committerGravatar Sadie Powell2022-07-19 17:00:23 +0100
commitb763b1e69e58de3d7895354682b9f8e484d7e981 (patch)
treee0f978e310f05cf3293c82ebae461fc469ab6756 /src/server.cpp
parentAllow remote servers to specify the context of a message. (diff)
parentAlso use binary exit codes in places that terminate abruptly. (diff)
Merge branch 'insp3' into master.
Diffstat (limited to 'src/server.cpp')
-rw-r--r--src/server.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/server.cpp b/src/server.cpp
index fe26485a1..acf0f3241 100644
--- a/src/server.cpp
+++ b/src/server.cpp
@@ -56,7 +56,17 @@ void InspIRCd::Exit(int status)
this->Cleanup();
ServerInstance = NULL;
delete this;
- exit (status);
+ QuickExit(status);
+}
+
+void InspIRCd::QuickExit(int status)
+{
+#ifdef INSPIRCD_BINARY_EXIT
+ // Some init systems handle non-binary exit statuses weirdly.
+ exit(status ? EXIT_FAILURE : EXIT_SUCCESS);
+#else
+ exit(status);
+#endif
}
void InspIRCd::Rehash(const std::string& uuid)