summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_master_process.c
diff options
context:
space:
mode:
authorMax Romanov <max.romanov@nginx.com>2017-06-23 19:19:41 +0300
committerMax Romanov <max.romanov@nginx.com>2017-06-23 19:19:41 +0300
commitac43bfcc72b3a92abc8d935dce8306b05b8c8185 (patch)
tree7512aa8f4a1602a7da81518e31b4349ca49faecf /src/nxt_master_process.c
parente5fe254e1e741f24d53f5199cc4f187efd6a9924 (diff)
downloadunit-ac43bfcc72b3a92abc8d935dce8306b05b8c8185.tar.gz
unit-ac43bfcc72b3a92abc8d935dce8306b05b8c8185.tar.bz2
nxt_process_create() changed to add process to runtime before callbacks.
Diffstat (limited to 'src/nxt_master_process.c')
-rw-r--r--src/nxt_master_process.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/src/nxt_master_process.c b/src/nxt_master_process.c
index 218aff5e..7a23baf2 100644
--- a/src/nxt_master_process.c
+++ b/src/nxt_master_process.c
@@ -244,7 +244,7 @@ nxt_master_create_worker_process(nxt_task_t *task, nxt_runtime_t *rt,
port->engine = 0;
port->type = init->type;
- pid = nxt_process_create(task, init);
+ pid = nxt_process_create(task, process);
switch (pid) {
@@ -253,19 +253,10 @@ nxt_master_create_worker_process(nxt_task_t *task, nxt_runtime_t *rt,
case 0:
/* A worker process, return to the event engine work queue loop. */
- process->pid = nxt_pid;
- port->pid = nxt_pid;
-
- nxt_runtime_process_add(rt, process);
-
return NXT_AGAIN;
default:
/* The master process created a new process. */
- process->pid = pid;
- port->pid = pid;
-
- nxt_runtime_process_add(rt, process);
nxt_port_read_close(port);
nxt_port_write_enable(task, port);