diff options
Diffstat (limited to 'src/socketengine_kqueue.cpp')
-rw-r--r-- | src/socketengine_kqueue.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/socketengine_kqueue.cpp b/src/socketengine_kqueue.cpp index 246b5e524..e33f9f772 100644 --- a/src/socketengine_kqueue.cpp +++ b/src/socketengine_kqueue.cpp @@ -21,6 +21,16 @@ 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) |