aboutsummaryrefslogtreecommitdiff
path: root/src/core/nginx.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/nginx.c')
-rw-r--r--src/core/nginx.c12
1 files changed, 10 insertions, 2 deletions
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