23a24
> static void nxt_runtime_stop_all_processes(nxt_task_t *task, nxt_runtime_t *rt);
441c442
< nxt_main_stop_all_processes(task, rt);
---
> nxt_runtime_stop_all_processes(task, rt);
480a482,506
> void
> nxt_runtime_stop_app_processes(nxt_task_t *task, nxt_runtime_t *rt)
> {
> nxt_port_t *port;
> nxt_process_t *process;
> nxt_process_init_t *init;
>
> nxt_runtime_process_each(rt, process) {
>
> init = nxt_process_init(process);
>
> if (init->type == NXT_PROCESS_APP) {
>
> nxt_process_port_each(process, port) {
>
> (void) nxt_port_socket_write(task, port, NXT_PORT_MSG_QUIT, -1,
> 0, 0, NULL);
>
> } nxt_process_port_loop;
> }
>
> } nxt_runtime_process_loop;
> }
>
>
481a508,526
> nxt_runtime_stop_all_processes(nxt_task_t *task, nxt_runtime_t *rt)
> {
> nxt_port_t *port;
> nxt_process_t *process;
>
> nxt_runtime_process_each(rt, process) {
>
> nxt_process_port_each(process, port) {
>
> (void) nxt_port_socket_write(task, port, NXT_PORT_MSG_QUIT, -1, 0,
> 0, NULL);
>
> } nxt_process_port_loop;
>
> } nxt_runtime_process_loop;
> }
>
>
> static void
527a573,576
> if (rt->port_by_type[rt->type] != NULL) {
> nxt_port_use(task, rt->port_by_type[rt->type], -1);
> }
>
1309c1358,1360
< process = nxt_mp_zalloc(rt->mem_pool, sizeof(nxt_process_t));
---
> process = nxt_mp_zalloc(rt->mem_pool,
> sizeof(nxt_process_t) + sizeof(nxt_process_init_t));
>
1350,1351c1401,1403
< if (process->init != NULL) {
< nxt_mp_destroy(process->init->mem_pool);
---
> /* processes from nxt_runtime_process_get() have no memory pool */
> if (process->mem_pool != NULL) {
> nxt_mp_destroy(process->mem_pool);