summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/nxt_process.c22
-rw-r--r--src/nxt_process_type.h3
-rw-r--r--src/nxt_runtime.c32
-rw-r--r--src/nxt_runtime.h1
4 files changed, 12 insertions, 46 deletions
diff --git a/src/nxt_process.c b/src/nxt_process.c
index a717eb9e..beb33f63 100644
--- a/src/nxt_process.c
+++ b/src/nxt_process.c
@@ -19,21 +19,19 @@ nxt_pid_t nxt_pid;
nxt_pid_t nxt_ppid;
nxt_bool_t nxt_proc_conn_martix[NXT_PROCESS_MAX][NXT_PROCESS_MAX] = {
- { 0, 0, 0, 0, 0, 0 },
- { 0, 1, 1, 1, 1, 1 },
- { 0, 1, 0, 0, 0, 0 },
- { 0, 1, 0, 0, 1, 0 },
- { 0, 1, 0, 1, 0, 1 },
- { 0, 1, 0, 0, 0, 0 },
+ { 1, 1, 1, 1, 1 },
+ { 1, 0, 0, 0, 0 },
+ { 1, 0, 0, 1, 0 },
+ { 1, 0, 1, 0, 1 },
+ { 1, 0, 0, 0, 0 },
};
nxt_bool_t nxt_proc_remove_notify_martix[NXT_PROCESS_MAX][NXT_PROCESS_MAX] = {
- { 0, 0, 0, 0, 0, 0 },
- { 0, 0, 0, 0, 0, 0 },
- { 0, 0, 0, 0, 0, 0 },
- { 0, 0, 0, 0, 1, 0 },
- { 0, 0, 0, 1, 0, 1 },
- { 0, 0, 0, 0, 1, 0 },
+ { 0, 0, 0, 0, 0 },
+ { 0, 0, 0, 0, 0 },
+ { 0, 0, 0, 1, 0 },
+ { 0, 0, 1, 0, 1 },
+ { 0, 0, 0, 1, 0 },
};
nxt_pid_t
diff --git a/src/nxt_process_type.h b/src/nxt_process_type.h
index 16d6dfc8..5ff06d63 100644
--- a/src/nxt_process_type.h
+++ b/src/nxt_process_type.h
@@ -9,8 +9,7 @@
typedef enum {
- NXT_PROCESS_SINGLE = 0,
- NXT_PROCESS_MAIN,
+ NXT_PROCESS_MAIN = 0,
NXT_PROCESS_DISCOVERY,
NXT_PROCESS_CONTROLLER,
NXT_PROCESS_ROUTER,
diff --git a/src/nxt_runtime.c b/src/nxt_runtime.c
index 5907b14e..9ecad82f 100644
--- a/src/nxt_runtime.c
+++ b/src/nxt_runtime.c
@@ -20,8 +20,6 @@ static nxt_int_t nxt_runtime_event_engines(nxt_task_t *task, nxt_runtime_t *rt);
static nxt_int_t nxt_runtime_thread_pools(nxt_thread_t *thr, nxt_runtime_t *rt);
static void nxt_runtime_start(nxt_task_t *task, void *obj, void *data);
static void nxt_runtime_initial_start(nxt_task_t *task);
-static void nxt_single_process_start(nxt_thread_t *thr, nxt_task_t *task,
- nxt_runtime_t *rt);
static void nxt_runtime_close_idle_connections(nxt_event_engine_t *engine);
static void nxt_runtime_exit(nxt_task_t *task, void *obj, void *data);
static nxt_int_t nxt_runtime_event_engine_change(nxt_task_t *task,
@@ -403,13 +401,7 @@ nxt_runtime_initial_start(nxt_task_t *task)
thr->engine->max_connections = rt->engine_connections;
- if (rt->main_process) {
- if (nxt_main_process_start(thr, task, rt) != NXT_ERROR) {
- return;
- }
-
- } else {
- nxt_single_process_start(thr, task, rt);
+ if (nxt_main_process_start(thr, task, rt) != NXT_ERROR) {
return;
}
@@ -419,27 +411,6 @@ fail:
}
-static void
-nxt_single_process_start(nxt_thread_t *thr, nxt_task_t *task, nxt_runtime_t *rt)
-{
- nxt_int_t ret;
-
- ret = nxt_runtime_thread_pool_create(thr, rt, rt->auxiliary_threads,
- 60000 * 1000000LL);
-
- if (nxt_slow_path(ret != NXT_OK)) {
- nxt_runtime_quit(task);
- return;
- }
-
- rt->types |= (1U << NXT_PROCESS_SINGLE);
-
- nxt_runtime_listen_sockets_enable(task, rt);
-
- return;
-}
-
-
void
nxt_runtime_quit(nxt_task_t *task)
{
@@ -709,7 +680,6 @@ nxt_runtime_conf_init(nxt_task_t *task, nxt_runtime_t *rt)
const nxt_event_interface_t *interface;
rt->daemon = 1;
- rt->main_process = 1;
rt->engine_connections = 256;
rt->auxiliary_threads = 2;
rt->user_cred.user = NXT_USER;
diff --git a/src/nxt_runtime.h b/src/nxt_runtime.h
index 87b7966e..d0546e63 100644
--- a/src/nxt_runtime.h
+++ b/src/nxt_runtime.h
@@ -49,7 +49,6 @@ struct nxt_runtime_s {
uint8_t daemon;
uint8_t batch;
- uint8_t main_process;
const char *engine;
uint32_t engine_connections;
uint32_t auxiliary_threads;