diff options
author | Max Romanov <max.romanov@nginx.com> | 2017-07-07 16:01:34 +0300 |
---|---|---|
committer | Max Romanov <max.romanov@nginx.com> | 2017-07-07 16:01:34 +0300 |
commit | 74cda90e31f97ba0ebd6483f2b073c1240b93a58 (patch) | |
tree | 69727640f476822e3cc1e40ac09bf645251617be /src/nxt_port.h | |
parent | 61008a7c0b45fe55f3f611c61f81e569e6baee30 (diff) | |
download | unit-74cda90e31f97ba0ebd6483f2b073c1240b93a58.tar.gz unit-74cda90e31f97ba0ebd6483f2b073c1240b93a58.tar.bz2 |
Process stop notification from master to all other processes.
New port message type introduced NXT_PORT_MSG_REMOVE_PID. Default handler
removes process description from nxt_runtime_t with all ports, incoming and
outgoing mmaps etc.
Diffstat (limited to 'src/nxt_port.h')
-rw-r--r-- | src/nxt_port.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/nxt_port.h b/src/nxt_port.h index 109071aa..c7566426 100644 --- a/src/nxt_port.h +++ b/src/nxt_port.h @@ -14,9 +14,10 @@ typedef enum { NXT_PORT_MSG_CHANGE_FILE, NXT_PORT_MSG_MMAP, NXT_PORT_MSG_DATA, -} nxt_port_msg_type_t; + NXT_PORT_MSG_REMOVE_PID, -#define NXT_PORT_MSG_MAX NXT_PORT_MSG_DATA + NXT_PORT_MSG_MAX, +} nxt_port_msg_type_t; /* Passed as a first iov chunk. */ @@ -56,10 +57,9 @@ struct nxt_port_recv_msg_s { struct nxt_port_s { - /* Must be the first field. */ nxt_fd_event_t socket; - nxt_queue_link_t link; + nxt_queue_link_t link; /* for nxt_process_t.ports */ nxt_queue_t messages; /* of nxt_port_send_msg_t */ @@ -132,6 +132,7 @@ void nxt_port_change_log_file_handler(nxt_task_t *task, nxt_port_recv_msg_t *msg); void nxt_port_mmap_handler(nxt_task_t *task, nxt_port_recv_msg_t *msg); void nxt_port_data_handler(nxt_task_t *task, nxt_port_recv_msg_t *msg); +void nxt_port_remove_pid_handler(nxt_task_t *task, nxt_port_recv_msg_t *msg); void nxt_port_empty_handler(nxt_task_t *task, nxt_port_recv_msg_t *msg); |