]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Check for failed epoll or kqueue
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Tue, 16 May 2006 11:38:45 +0000 (11:38 +0000)
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Tue, 16 May 2006 11:38:45 +0000 (11:38 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3961 e03df62e-2008-0410-955e-edbf42e46eb7

src/socketengine.cpp

index bcc8e23af32e7567545a1a135dc943004af01e2d..976f578fd542adb5e4d69c9252eae590996eb042 100644 (file)
@@ -40,6 +40,17 @@ SocketEngine::SocketEngine()
 #ifdef USE_KQUEUE
        EngineHandle = kqueue();
 #endif
+#ifdef USE_SELECT
+       EngineHandle = 0;
+#endif
+       if (EngineHandle == -1)
+       {
+               log(SPARSE,"ERROR: Could not initialize socket engine. Your kernel probably does not have the proper features.");
+               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.");
+               Exit(0);
+       }
        CurrentSetSize = 0;
 }