From 48fef6654cc90e05004648423cb5dd7c6f7770f0 Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Tue, 24 Feb 2004 17:31:46 +0000 Subject: nginx-0.0.2-2004-02-24-20:31:46 import --- src/core/nginx.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/core/nginx.c') diff --git a/src/core/nginx.c b/src/core/nginx.c index a9418992e..592711522 100644 --- a/src/core/nginx.c +++ b/src/core/nginx.c @@ -649,10 +649,18 @@ static void ngx_worker_process_cycle(ngx_cycle_t *cycle, void *data) #if (NGX_THREADS) - ngx_init_threads(5, 128 * 1024 * 1024, cycle->log); + if (ngx_init_threads(5, 128 * 1024 * 1024, cycle->log) == NGX_ERROR) { + /* fatal */ + exit(1); + } for (i = 0; i < 1; i++) { - ngx_create_thread(&tid, ngx_worker_thread_cycle, cycle, cycle->log); + if (ngx_create_thread(&tid, ngx_worker_thread_cycle, + cycle, cycle->log) != 0) + { + /* fatal */ + exit(1); + } } #endif -- cgit