diff options
author | Igor Sysoev <igor@sysoev.ru> | 2017-09-06 02:30:55 +0300 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2017-09-06 02:30:55 +0300 |
commit | 58907888e510f6907513da2ea4506ee78b9bf77c (patch) | |
tree | 1d16cf9fb4ad4d21c23b3c825c48408b75a13ef4 /src/nxt_port.c | |
parent | 22ae3d4ff55ae778688a89c585b5da8eddce6cc0 (diff) | |
download | unit-58907888e510f6907513da2ea4506ee78b9bf77c.tar.gz unit-58907888e510f6907513da2ea4506ee78b9bf77c.tar.bz2 |
Style fixes.
Diffstat (limited to 'src/nxt_port.c')
-rw-r--r-- | src/nxt_port.c | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/src/nxt_port.c b/src/nxt_port.c index 1f50caa1..8adbcde4 100644 --- a/src/nxt_port.c +++ b/src/nxt_port.c @@ -170,22 +170,22 @@ nxt_port_send_new_port(nxt_task_t *task, nxt_runtime_t *rt, nxt_debug(task, "new port %d for process %PI", new_port->pair[1], new_port->pid); - nxt_runtime_process_each(rt, process) - { + nxt_runtime_process_each(rt, process) { + if (process->pid == new_port->pid || process->pid == nxt_pid) { continue; } port = nxt_process_port_first(process); - if (port->type == NXT_PROCESS_MAIN || - port->type == NXT_PROCESS_CONTROLLER || - port->type == NXT_PROCESS_ROUTER) { - + if (port->type == NXT_PROCESS_MAIN + || port->type == NXT_PROCESS_CONTROLLER + || port->type == NXT_PROCESS_ROUTER) + { (void) nxt_port_send_port(task, port, new_port, stream); } - } - nxt_runtime_process_loop; + + } nxt_runtime_process_loop; } @@ -340,8 +340,8 @@ nxt_port_change_log_file(nxt_task_t *task, nxt_runtime_t *rt, nxt_uint_t slot, nxt_debug(task, "change log file #%ui fd:%FD", slot, fd); - nxt_runtime_process_each(rt, process) - { + nxt_runtime_process_each(rt, process) { + if (nxt_pid == process->pid) { continue; } @@ -358,8 +358,8 @@ nxt_port_change_log_file(nxt_task_t *task, nxt_runtime_t *rt, nxt_uint_t slot, (void) nxt_port_socket_write(task, port, NXT_PORT_MSG_CHANGE_FILE, fd, 0, 0, b); - } - nxt_runtime_process_loop; + + } nxt_runtime_process_loop; } @@ -386,7 +386,6 @@ nxt_port_change_log_file_handler(nxt_task_t *task, nxt_port_recv_msg_t *msg) * for new log file. This change is performed atomically in the kernel. */ if (nxt_file_redirect(log_file, msg->fd) == NXT_OK) { - if (slot == 0) { (void) nxt_file_stderr(log_file); } |