diff options
| author | 2023-07-13 13:31:06 +0100 | |
|---|---|---|
| committer | 2023-07-13 14:07:26 +0100 | |
| commit | b4e3e973297db456f0ba8d7fdb8bbfc9c8426ea7 (patch) | |
| tree | 6e642a3690d163861d6d14e86b57ccf300bd3e0c /src/server.cpp | |
| parent | Error out if CMake is used on non-Windows. (diff) | |
Simplify the codes that InspIRCd can exit with.
The custom codes that InspIRCd exits with are not very useful and can confuse init systems like systemd which assume that certain
exit codes mean certain things. INSPIRCD_BINARY_EXIT was a workaround
for this in v3 but considering thatsers have to check the logs anyway
so we may as well just use EXIT_SUCCESS and EXIT_FAILURE.
Diffstat (limited to 'src/server.cpp')
| -rw-r--r-- | src/server.cpp | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/server.cpp b/src/server.cpp index 653ab16f9..1eba75e92 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -27,14 +27,13 @@ #include "inspircd.h" -#include "exitcodes.h" void InspIRCd::SignalHandler(int signal) { switch (signal) { case SIGTERM: - Exit(EXIT_STATUS_SIGTERM); + Exit(EXIT_FAILURE); #ifndef _WIN32 case SIGHUP: @@ -63,12 +62,7 @@ void InspIRCd::Exit(int 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) |
