]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/socketengine_kqueue.cpp
Swap around ERROR and SNONOTICE in SendError() so that the server doesnt try and...
[user/henk/code/inspircd.git] / src / socketengine_kqueue.cpp
index 246b5e524a6307313f6391b9633c15d0e86ba52a..e33f9f772e8e22212c1dd298cb31db0b218a96db 100644 (file)
 
 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)
        {
@@ -35,7 +45,7 @@ KQueueEngine::KQueueEngine(InspIRCd* Instance) : SocketEngine(Instance)
 
 KQueueEngine::~KQueueEngine()
 {
-       close(EngineHandle);
+       this->Close(EngineHandle);
 }
 
 bool KQueueEngine::AddFd(EventHandler* eh)