src/server/daemon/event_bsd.c

changeset 443
ef3c8a0e1fee
parent 433
39fe86ae4db0
child 503
aeaf7db26fac
equal deleted inserted replaced
442:05c2b62448b1 443:ef3c8a0e1fee
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,

mercurial