43 for(int i=0;i<cfg->nthreads;i++) { |
43 for(int i=0;i<cfg->nthreads;i++) { |
44 EventHandler *handler = malloc(sizeof(EventHandler)); |
44 EventHandler *handler = malloc(sizeof(EventHandler)); |
45 ev->instances[i] = handler; |
45 ev->instances[i] = handler; |
46 |
46 |
47 handler->kqueue = kqueue(); |
47 handler->kqueue = kqueue(); |
48 if(handler->kqueue == 0) { |
48 if(handler->kqueue < 0) { |
49 // TODO: error |
49 log_ereport(LOG_FAILURE, "evhandler_create: kqueue: %s", strerror(errno)); |
50 return NULL; |
50 return NULL; |
51 } |
51 } |
52 |
52 |
53 SYS_THREAD t = systhread_start( |
53 SYS_THREAD t = systhread_start( |
54 0, |
54 0, |