summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_process.c
diff options
context:
space:
mode:
authorKonstantin Pavlov <thresh@nginx.com>2023-05-10 10:29:16 -0700
committerKonstantin Pavlov <thresh@nginx.com>2023-05-10 10:29:16 -0700
commit69235c513277c64b513447d9b92c3c03d616f577 (patch)
tree0780c92ba28d92b547c85ea0bee5e3040e14dee2 /src/nxt_process.c
parentb9bc222021e77bbdfb12576b3e315b962cf6b399 (diff)
parentfaf97dc06058de1c929af33a68adb34d3932b374 (diff)
downloadunit-1.30.0-1.tar.gz
unit-1.30.0-1.tar.bz2
Merged with the default branch.1.30.0-1
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);
}