nxt_perl_psgi.c (1689:e0d01647db76) nxt_perl_psgi.c (1980:43553aa72111)
1
2/*
3 * Copyright (C) Alexander Borisov
4 * Copyright (C) NGINX, Inc.
5 */
6
7#include <perl/nxt_perl_psgi_layer.h>
8

--- 1170 unchanged lines hidden (view full) ---

1179 rc = nxt_perl_psgi_init_threads(c);
1180
1181 PERL_SET_CONTEXT(pctx.my_perl);
1182
1183 if (nxt_slow_path(rc != NXT_UNIT_OK)) {
1184 goto fail;
1185 }
1186
1
2/*
3 * Copyright (C) Alexander Borisov
4 * Copyright (C) NGINX, Inc.
5 */
6
7#include <perl/nxt_perl_psgi_layer.h>
8

--- 1170 unchanged lines hidden (view full) ---

1179 rc = nxt_perl_psgi_init_threads(c);
1180
1181 PERL_SET_CONTEXT(pctx.my_perl);
1182
1183 if (nxt_slow_path(rc != NXT_UNIT_OK)) {
1184 goto fail;
1185 }
1186
1187 nxt_unit_default_init(task, &perl_init);
1187 nxt_unit_default_init(task, &perl_init, common_conf);
1188
1189 perl_init.callbacks.request_handler = nxt_perl_psgi_request_handler;
1190 perl_init.callbacks.ready_handler = nxt_perl_psgi_ready_handler;
1191 perl_init.data = c;
1192 perl_init.ctx_data = &pctx;
1188
1189 perl_init.callbacks.request_handler = nxt_perl_psgi_request_handler;
1190 perl_init.callbacks.ready_handler = nxt_perl_psgi_ready_handler;
1191 perl_init.data = c;
1192 perl_init.ctx_data = &pctx;
1193 perl_init.shm_limit = common_conf->shm_limit;
1194
1195 unit_ctx = nxt_unit_init(&perl_init);
1196 if (nxt_slow_path(unit_ctx == NULL)) {
1197 goto fail;
1198 }
1199
1200 rc = nxt_unit_run(unit_ctx);
1201

--- 85 unchanged lines hidden (view full) ---

1287static int
1288nxt_perl_psgi_ready_handler(nxt_unit_ctx_t *ctx)
1289{
1290 int res;
1291 uint32_t i;
1292 nxt_perl_app_conf_t *c;
1293 nxt_perl_psgi_ctx_t *pctx;
1294
1193
1194 unit_ctx = nxt_unit_init(&perl_init);
1195 if (nxt_slow_path(unit_ctx == NULL)) {
1196 goto fail;
1197 }
1198
1199 rc = nxt_unit_run(unit_ctx);
1200

--- 85 unchanged lines hidden (view full) ---

1286static int
1287nxt_perl_psgi_ready_handler(nxt_unit_ctx_t *ctx)
1288{
1289 int res;
1290 uint32_t i;
1291 nxt_perl_app_conf_t *c;
1292 nxt_perl_psgi_ctx_t *pctx;
1293
1295 /* Worker thread context. */
1296 if (!nxt_unit_is_main_ctx(ctx)) {
1297 return NXT_UNIT_OK;
1298 }
1299
1300 c = ctx->unit->data;
1301
1302 if (c->threads <= 1) {
1303 return NXT_UNIT_OK;
1304 }
1305
1306 for (i = 0; i < c->threads - 1; i++) {
1307 pctx = &nxt_perl_psgi_ctxs[i];

--- 157 unchanged lines hidden ---
1294 c = ctx->unit->data;
1295
1296 if (c->threads <= 1) {
1297 return NXT_UNIT_OK;
1298 }
1299
1300 for (i = 0; i < c->threads - 1; i++) {
1301 pctx = &nxt_perl_psgi_ctxs[i];

--- 157 unchanged lines hidden ---