nxt_port.c (343:9fa845db60fb) nxt_port.c (347:e14011f5f005)
1
2/*
3 * Copyright (C) Igor Sysoev
4 * Copyright (C) NGINX, Inc.
5 */
6
7#include <nxt_main.h>
8#include <nxt_runtime.h>

--- 269 unchanged lines hidden (view full) ---

278 port->socket.task = task;
279
280 nxt_runtime_port_add(task, port);
281
282 nxt_port_use(task, port, -1);
283
284 nxt_port_write_enable(task, port);
285
1
2/*
3 * Copyright (C) Igor Sysoev
4 * Copyright (C) NGINX, Inc.
5 */
6
7#include <nxt_main.h>
8#include <nxt_runtime.h>

--- 269 unchanged lines hidden (view full) ---

278 port->socket.task = task;
279
280 nxt_runtime_port_add(task, port);
281
282 nxt_port_use(task, port, -1);
283
284 nxt_port_write_enable(task, port);
285
286 msg->new_port = port;
286 msg->u.new_port = port;
287}
288
289
290void
291nxt_port_process_ready_handler(nxt_task_t *task, nxt_port_recv_msg_t *msg)
292{
293 nxt_port_t *port;
294 nxt_process_t *process;

--- 141 unchanged lines hidden (view full) ---

436 nxt_process_t *process;
437
438 buf = msg->buf;
439
440 nxt_assert(nxt_buf_used_size(buf) == sizeof(pid));
441
442 nxt_memcpy(&pid, buf->mem.pos, sizeof(pid));
443
287}
288
289
290void
291nxt_port_process_ready_handler(nxt_task_t *task, nxt_port_recv_msg_t *msg)
292{
293 nxt_port_t *port;
294 nxt_process_t *process;

--- 141 unchanged lines hidden (view full) ---

436 nxt_process_t *process;
437
438 buf = msg->buf;
439
440 nxt_assert(nxt_buf_used_size(buf) == sizeof(pid));
441
442 nxt_memcpy(&pid, buf->mem.pos, sizeof(pid));
443
444 msg->u.removed_pid = pid;
445
444 nxt_debug(task, "port remove pid %PI handler", pid);
445
446 rt = task->thread->runtime;
447
448 nxt_port_rpc_remove_peer(task, msg->port, pid);
449
450 process = nxt_runtime_process_find(rt, pid);
451

--- 98 unchanged lines hidden ---
446 nxt_debug(task, "port remove pid %PI handler", pid);
447
448 rt = task->thread->runtime;
449
450 nxt_port_rpc_remove_peer(task, msg->port, pid);
451
452 process = nxt_runtime_process_find(rt, pid);
453

--- 98 unchanged lines hidden ---