summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_process.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nxt_process.c')
-rw-r--r--src/nxt_process.c27
1 files changed, 6 insertions, 21 deletions
diff --git a/src/nxt_process.c b/src/nxt_process.c
index 025efe70..ce2de774 100644
--- a/src/nxt_process.c
+++ b/src/nxt_process.c
@@ -5,6 +5,8 @@
*/
#include <nxt_main.h>
+
+#include <nxt_application.h>
#include <nxt_cgroup.h>
#if (NXT_HAVE_LINUX_NS)
@@ -651,6 +653,10 @@ nxt_process_setup(nxt_task_t *task, nxt_process_t *process)
thread = task->thread;
rt = thread->runtime;
+ if (process->parent_port == rt->port_by_type[NXT_PROCESS_PROTOTYPE]) {
+ nxt_app_set_logs();
+ }
+
nxt_random_init(&thread->random);
rt->type = init->type;
@@ -1251,14 +1257,9 @@ nxt_process_close_ports(nxt_task_t *task, nxt_process_t *process)
void
nxt_process_quit(nxt_task_t *task, nxt_uint_t exit_status)
{
- nxt_uint_t n;
nxt_queue_t *listen;
- nxt_runtime_t *rt;
nxt_queue_link_t *link, *next;
nxt_listen_event_t *lev;
- nxt_listen_socket_t *ls;
-
- rt = task->thread->runtime;
nxt_debug(task, "close listen connections");
@@ -1275,21 +1276,5 @@ nxt_process_quit(nxt_task_t *task, nxt_uint_t exit_status)
nxt_fd_event_close(task->thread->engine, &lev->socket);
}
- if (rt->listen_sockets != NULL) {
-
- ls = rt->listen_sockets->elts;
- n = rt->listen_sockets->nelts;
-
- while (n != 0) {
- nxt_socket_close(task, ls->socket);
- ls->socket = -1;
-
- ls++;
- n--;
- }
-
- rt->listen_sockets->nelts = 0;
- }
-
nxt_runtime_quit(task, exit_status);
}