Show
Ignore:
Timestamp:
01/16/08 04:57:05 (10 years ago)
Author:
Theo Schlossnagle <jesus@omniti.com>
git-committer:
Theo Schlossnagle <jesus@omniti.com> 1200459425 +0000
git-parent:

[7212f9de44a1f04707e822e3337100a80f707cb3]

git-author:
Theo Schlossnagle <jesus@omniti.com> 1200459425 +0000
Message:

make this work on Mac OS X

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/eventer/eventer_kqueue_impl.c

    rb62cf2b rf235ad4  
    88#include "utils/noit_atomic.h" 
    99#include "utils/noit_skiplist.h" 
     10#include "utils/noit_log.h" 
    1011 
    1112#include <errno.h> 
     
    265266                      NULL, 0, 
    266267                      &__zerotime); 
     268      noit_log(noit_debug, &__now, "debug: kevent(%d, [], %d) => %d\n", kqueue_fd, master_kqs->__ke_vec_used, fd_cnt); 
    267269      if(fd_cnt < 0) { 
    268         fprintf(stderr, "kevent: %s\n", strerror(errno)); 
     270        noit_log(noit_error, &__now, "kevent: %s\n", strerror(errno)); 
    269271      } 
    270272      master_kqs->__ke_vec_used = 0; 
     
    278280                    ke_vec, ke_vec_a, 
    279281                    &__kqueue_sleeptime); 
     282    noit_log(noit_debug, &__now, "debug: kevent(%d, [], %d) => %d\n", kqueue_fd, ke_vec_used, fd_cnt); 
    280283    ke_vec_used = 0; 
    281284    if(fd_cnt < 0) { 
    282       fprintf(stderr, "kevent: %s\n", strerror(errno)); 
     285      noit_log(noit_error, &__now, "kevent: %s\n", strerror(errno)); 
    283286    } 
    284287    else { 
     
    291294 
    292295        ke = &ke_vec[idx]; 
     296        if(ke->flags & EV_ERROR) { 
     297          if(ke->data != EBADF) 
     298            noit_log(noit_error, &__now, "error: %s\n", strerror(ke->data)); 
     299          continue; 
     300        } 
    293301        e = (eventer_t)ke->udata; 
    294302        fd = ke->ident;