KQueueEngine::KQueueEngine(InspIRCd* Instance) : SocketEngine(Instance)
{
+ this->RecoverFromFork();
+}
+
+void KQueueEngine::RecoverFromFork()
+{
+ /*
+ * The only bad thing about kqueue is that its fd cant survive a fork and is not inherited.
+ * BUM HATS.
+ *
+ */
EngineHandle = kqueue();
if (EngineHandle == -1)
{
ServerInstance->Log(SPARSE,"ERROR: this is a fatal error, exiting now.");
printf("ERROR: Could not initialize socket engine. Your kernel probably does not have the proper features.");
printf("ERROR: this is a fatal error, exiting now.");
- InspIRCd::Exit(EXIT_STATUS_SOCKETENGINE);
+ ServerInstance->Exit(EXIT_STATUS_SOCKETENGINE);
}
CurrentSetSize = 0;
}
KQueueEngine::~KQueueEngine()
{
- close(EngineHandle);
+ this->Close(EngineHandle);
}
bool KQueueEngine::AddFd(EventHandler* eh)