Sending shared port to application prototype.

Application process started with shared port (and queue) already configured.
But still waits for PORT_ACK message from router to start request processing
(so-called "ready state").

Waiting for router confirmation is necessary.  Otherwise, the application may
produce response and send it to router before the router have the information
about the application process.  This is a subject of further optimizations.
This commit is contained in:
Max Romanov
2021-11-24 13:11:47 +03:00
parent ef1ebf96f3
commit 2c636a03f3
8 changed files with 112 additions and 87 deletions

View File

@@ -1052,6 +1052,9 @@ nxt_unit_default_init(nxt_task_t *task, nxt_unit_init_t *init,
init->read_port.in_fd = my_port->pair[0];
init->read_port.out_fd = my_port->pair[1];
init->shared_port_fd = conf->shared_port_fd;
init->shared_queue_fd = conf->shared_queue_fd;
init->log_fd = 2;
init->shm_limit = conf->shm_limit;