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/nginext | |
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/nginext')
-rw-r--r-- | src/nginext/nxt_go_port.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/nginext/nxt_go_port.c b/src/nginext/nxt_go_port.c index 47e46f02..58ba90ea 100644 --- a/src/nginext/nxt_go_port.c +++ b/src/nginext/nxt_go_port.c @@ -146,7 +146,7 @@ nxt_go_port_on_read(void *buf, size_t buf_size, void *oob, size_t oob_size) nxt_go_debug("using data in shared memory"); } - if (port_msg->type > NXT_PORT_MSG_MAX) { + if (port_msg->type >= NXT_PORT_MSG_MAX) { nxt_go_warn("unknown message type (%d)", (int)port_msg->type); goto fail; } @@ -181,6 +181,13 @@ nxt_go_port_on_read(void *buf, size_t buf_size, void *oob, size_t oob_size) return nxt_go_data_handler(port_msg, buf_size); + case NXT_PORT_MSG_REMOVE_PID: + nxt_go_debug("remove pid"); + + /* TODO remove all ports for this pid in Go */ + /* TODO remove incoming & outgoing mmaps for this pid */ + break; + default: goto fail; } |