Skip to content

Commit

Permalink
Allow forcing binary exit codes at compile time.
Browse files Browse the repository at this point in the history
This is useful with some init systems that handle our exit codes
strangely.
  • Loading branch information
SadieCat committed Jul 19, 2022
1 parent af78050 commit f3fa07f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,13 @@ void InspIRCd::Exit(int status)
this->Cleanup();
ServerInstance = NULL;
delete this;
exit (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)
Expand Down

0 comments on commit f3fa07f

Please sign in to comment.