summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-05-16 11:38:45 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-05-16 11:38:45 +0000
commit31dc0f8489dfbf63efbf0960711b3bbaa5543e30 (patch)
treea084153fe7a10384d31360bb5a9a8750b49b67ab
parent42a1a1845f6f4681a2e56e793b0509b2f88b6f61 (diff)
Check for failed epoll or kqueue
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3961 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/socketengine.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/socketengine.cpp b/src/socketengine.cpp
index bcc8e23af..976f578fd 100644
--- a/src/socketengine.cpp
+++ b/src/socketengine.cpp
@@ -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;
}