nxt_main_process.c (1970:06f77fc5a479) nxt_main_process.c (1980:43553aa72111)
1
2/*
3 * Copyright (C) Igor Sysoev
4 * Copyright (C) NGINX, Inc.
5 */
6
7#include <nxt_main.h>
8#include <nxt_runtime.h>

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

149
150static nxt_conf_map_t nxt_common_app_limits_conf[] = {
151 {
152 nxt_string("shm"),
153 NXT_CONF_MAP_SIZE,
154 offsetof(nxt_common_app_conf_t, shm_limit),
155 },
156
1
2/*
3 * Copyright (C) Igor Sysoev
4 * Copyright (C) NGINX, Inc.
5 */
6
7#include <nxt_main.h>
8#include <nxt_runtime.h>

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

149
150static nxt_conf_map_t nxt_common_app_limits_conf[] = {
151 {
152 nxt_string("shm"),
153 NXT_CONF_MAP_SIZE,
154 offsetof(nxt_common_app_conf_t, shm_limit),
155 },
156
157 {
158 nxt_string("requests"),
159 NXT_CONF_MAP_INT32,
160 offsetof(nxt_common_app_conf_t, request_limit),
161 },
162
157};
158
159
160static nxt_conf_map_t nxt_external_app_conf[] = {
161 {
162 nxt_string("executable"),
163 NXT_CONF_MAP_CSTRZ,
164 offsetof(nxt_common_app_conf_t, u.external.executable),

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

387
388 p = (u_char *) process->name;
389 *p++ = '"';
390 p = nxt_cpymem(p, init->name, app_conf->name.length);
391 p = nxt_cpymem(p, "\" application", 13);
392 *p = '\0';
393
394 app_conf->shm_limit = 100 * 1024 * 1024;
163};
164
165
166static nxt_conf_map_t nxt_external_app_conf[] = {
167 {
168 nxt_string("executable"),
169 NXT_CONF_MAP_CSTRZ,
170 offsetof(nxt_common_app_conf_t, u.external.executable),

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

393
394 p = (u_char *) process->name;
395 *p++ = '"';
396 p = nxt_cpymem(p, init->name, app_conf->name.length);
397 p = nxt_cpymem(p, "\" application", 13);
398 *p = '\0';
399
400 app_conf->shm_limit = 100 * 1024 * 1024;
401 app_conf->request_limit = 0;
395
396 start += app_conf->name.length + 1;
397
398 conf = nxt_conf_json_parse(process->mem_pool, start, b->mem.free, NULL);
399 if (conf == NULL) {
400 nxt_alert(task, "router app configuration parsing error");
401
402 goto failed;

--- 1155 unchanged lines hidden ---
402
403 start += app_conf->name.length + 1;
404
405 conf = nxt_conf_json_parse(process->mem_pool, start, b->mem.free, NULL);
406 if (conf == NULL) {
407 nxt_alert(task, "router app configuration parsing error");
408
409 goto failed;

--- 1155 unchanged lines hidden ---