Changeset 332
- Timestamp:
- 05/23/07 07:04:58 (2 years ago)
- Files:
-
- version_0/ext/em.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
version_0/ext/em.cpp
r325 r332 53 53 // objects before we start running. 54 54 gCurrentLoopTime = time(NULL); 55 56 /* We initialize the network library here (only on Windows of course) 57 * and initialize "loop breakers." Our destructor also does some network-level 58 * cleanup. There's thus an implicit assumption that any given instance of EventMachine_t 59 * will only call ::Run once. Is that a good assumption? Should we move some of these 60 * inits and de-inits into ::Run? 61 */ 62 #ifdef OS_WIN32 63 WSADATA w; 64 WSAStartup (MAKEWORD (1, 1), &w); 65 #endif 55 66 56 67 _InitializeLoopBreaker(); … … 128 139 * to that user. There is no meaningful implementation (and no error) 129 140 * on Windows. On Unix, a failure to setuid the caller-supplied string 130 * causes a fatal abort, because presumably the program is calling us141 * causes a fatal abort, because presumably the program is calling here 131 142 * in order to fulfill a security requirement. If we fail silently, 132 143 * the user may continue to run with too much privilege. 144 * 145 * TODO, we need to decide on and document a way of generating C++ level errors 146 * that can be wrapped in documented Ruby exceptions, so users can catch 147 * and handle them. And distinguish it from errors that we WON'T let the Ruby 148 * user catch (like security-violations and resource-overallocation). 149 * A setuid failure here would be in the latter category. 133 150 */ 134 151 … … 220 237 { 221 238 #ifdef OS_WIN32 222 WSADATA w;223 WSAStartup (MAKEWORD (1, 1), &w);224 239 HookControlC (true); 225 240 #endif