diff options
| author | Igor Sysoev <igor@sysoev.ru> | 2002-09-27 15:05:29 +0000 |
|---|---|---|
| committer | Igor Sysoev <igor@sysoev.ru> | 2002-09-27 15:05:29 +0000 |
| commit | 31f8818eb110d18e58fef72684418c33ddbd7a0b (patch) | |
| tree | 4a361ff0f3a30641e5f41fcb49e1504c919b70a5 /src/event/ngx_event.c | |
| parent | 170efb2b7d36e85db017e9daa25a0422aee8ce8a (diff) | |
| download | nginx-31f8818eb110d18e58fef72684418c33ddbd7a0b.tar.gz nginx-31f8818eb110d18e58fef72684418c33ddbd7a0b.tar.bz2 | |
nginx-0.0.1-2002-09-27-19:05:29 import
Diffstat (limited to 'src/event/ngx_event.c')
| -rw-r--r-- | src/event/ngx_event.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/event/ngx_event.c b/src/event/ngx_event.c index 62d3c1599..8fbdbe5d2 100644 --- a/src/event/ngx_event.c +++ b/src/event/ngx_event.c @@ -1,5 +1,6 @@ #include <ngx_config.h> +#include <ngx_core.h> #include <ngx_types.h> #include <ngx_string.h> #include <ngx_log.h> @@ -20,7 +21,7 @@ ngx_event_t *ngx_read_events, *ngx_write_events; #if !(USE_KQUEUE) -#if 0 +#if 1 ngx_event_type_e ngx_event_type = NGX_SELECT_EVENT; #else ngx_event_type_e ngx_event_type = NGX_KQUEUE_EVENT; @@ -29,7 +30,7 @@ ngx_event_type_e ngx_event_type = NGX_KQUEUE_EVENT; ngx_event_actions_t ngx_event_actions; /* ngx_event_type_e order */ -static void (*ngx_event_init[]) (int max_connections, ngx_log_t *log) = { +static int (*ngx_event_init[]) (int max_connections, ngx_log_t *log) = { ngx_select_init, #if (HAVE_POLL) ngx_poll_init, @@ -50,7 +51,8 @@ void ngx_pre_thread(ngx_array_t *ls, ngx_pool_t *pool, ngx_log_t *log) /* STUB */ int max_connections = 512; - ngx_init_events(max_connections, log); + if (ngx_init_events(max_connections, log) == NGX_ERROR) + exit(1); ngx_connections = ngx_alloc(sizeof(ngx_connection_t) * max_connections, log); |
