diff options
author | Max Romanov <max.romanov@nginx.com> | 2020-10-28 00:01:46 +0300 |
---|---|---|
committer | Max Romanov <max.romanov@nginx.com> | 2020-10-28 00:01:46 +0300 |
commit | 80a8cb835bb780cdb3047b232809c5dfd6e0e794 (patch) | |
tree | 36398fd70b59279d7fe3fdb6a61bf86594c3e1ab /src/nxt_external.c | |
parent | d8cc830ea0363009e40d6bf380db1147ad6fb41e (diff) | |
download | unit-80a8cb835bb780cdb3047b232809c5dfd6e0e794.tar.gz unit-80a8cb835bb780cdb3047b232809c5dfd6e0e794.tar.bz2 |
Preserving the app port write socket.
The socket is required for intercontextual communication in multithreaded apps.
Diffstat (limited to 'src/nxt_external.c')
-rw-r--r-- | src/nxt_external.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/nxt_external.c b/src/nxt_external.c index 1adb839c..5703e294 100644 --- a/src/nxt_external.c +++ b/src/nxt_external.c @@ -101,18 +101,24 @@ nxt_external_start(nxt_task_t *task, nxt_process_data_t *data) return NXT_ERROR; } + rc = nxt_external_fd_no_cloexec(task, my_port->pair[1]); + if (nxt_slow_path(rc != NXT_OK)) { + return NXT_ERROR; + } + end = buf + sizeof(buf); p = nxt_sprintf(buf, end, "%s;%uD;" "%PI,%ud,%d;" "%PI,%ud,%d;" - "%PI,%ud,%d;" + "%PI,%ud,%d,%d;" "%d,%z,%Z", NXT_VERSION, my_port->process->stream, main_port->pid, main_port->id, main_port->pair[1], router_port->pid, router_port->id, router_port->pair[1], my_port->pid, my_port->id, my_port->pair[0], + my_port->pair[1], 2, conf->shm_limit); if (nxt_slow_path(p == end)) { |