Lines Matching refs:msg

53     nxt_port_recv_msg_t *msg);
55 nxt_port_recv_msg_t *msg);
59 nxt_port_recv_msg_t *msg);
62 nxt_port_recv_msg_t *msg);
64 nxt_port_recv_msg_t *msg);
68 nxt_port_recv_msg_t *msg);
407 nxt_main_data_handler(nxt_task_t *task, nxt_port_recv_msg_t *msg) in nxt_main_data_handler() argument
410 nxt_buf_mem_used_size(&msg->buf->mem), msg->buf->mem.pos); in nxt_main_data_handler()
415 nxt_main_new_port_handler(nxt_task_t *task, nxt_port_recv_msg_t *msg) in nxt_main_new_port_handler() argument
420 nxt_port_new_port_handler(task, msg); in nxt_main_new_port_handler()
422 port = msg->u.new_port; in nxt_main_new_port_handler()
426 && msg->fd[1] != -1) in nxt_main_new_port_handler()
429 PROT_READ | PROT_WRITE, MAP_SHARED, msg->fd[1], 0); in nxt_main_new_port_handler()
434 nxt_fd_close(msg->fd[1]); in nxt_main_new_port_handler()
435 msg->fd[1] = -1; in nxt_main_new_port_handler()
441 nxt_main_start_process_handler(nxt_task_t *task, nxt_port_recv_msg_t *msg) in nxt_main_start_process_handler() argument
463 if (nxt_slow_path(port->pid != nxt_recv_msg_cmsg_pid(msg))) { in nxt_main_start_process_handler()
465 nxt_recv_msg_cmsg_pid(msg)); in nxt_main_start_process_handler()
487 b = nxt_buf_chk_make_plain(process->mem_pool, msg->buf, msg->size); in nxt_main_start_process_handler()
500 app_conf->shared_port_fd = msg->fd[0]; in nxt_main_start_process_handler()
501 app_conf->shared_queue_fd = msg->fd[1]; in nxt_main_start_process_handler()
585 process->stream = msg->port_msg.stream; in nxt_main_start_process_handler()
598 msg->fd[0] = -1; in nxt_main_start_process_handler()
599 msg->fd[1] = -1; in nxt_main_start_process_handler()
608 port = nxt_runtime_port_find(rt, msg->port_msg.pid, in nxt_main_start_process_handler()
609 msg->port_msg.reply_port); in nxt_main_start_process_handler()
613 -1, msg->port_msg.stream, 0, NULL); in nxt_main_start_process_handler()
618 nxt_fd_close(msg->fd[0]); in nxt_main_start_process_handler()
619 msg->fd[0] = -1; in nxt_main_start_process_handler()
621 nxt_fd_close(msg->fd[1]); in nxt_main_start_process_handler()
622 msg->fd[1] = -1; in nxt_main_start_process_handler()
627 nxt_main_process_created_handler(nxt_task_t *task, nxt_port_recv_msg_t *msg) in nxt_main_process_created_handler() argument
635 port = nxt_runtime_port_find(rt, msg->port_msg.pid, in nxt_main_process_created_handler()
636 msg->port_msg.reply_port); in nxt_main_process_created_handler()
654 -1, msg->port_msg.stream, 0, NULL); in nxt_main_process_created_handler()
664 -1, msg->port_msg.stream, 0, NULL); in nxt_main_process_created_handler()
695 nxt_main_process_whoami_handler(nxt_task_t *task, nxt_port_recv_msg_t *msg) in nxt_main_process_whoami_handler() argument
703 nxt_assert(msg->port_msg.reply_port == 0); in nxt_main_process_whoami_handler()
705 if (nxt_slow_path(msg->buf == NULL in nxt_main_process_whoami_handler()
706 || nxt_buf_used_size(msg->buf) != sizeof(nxt_pid_t))) in nxt_main_process_whoami_handler()
712 nxt_memcpy(&ppid, msg->buf->mem.pos, sizeof(nxt_pid_t)); in nxt_main_process_whoami_handler()
722 pid = nxt_recv_msg_cmsg_pid(msg); in nxt_main_process_whoami_handler()
725 msg->fd[0]); in nxt_main_process_whoami_handler()
727 if (msg->fd[0] != -1) { in nxt_main_process_whoami_handler()
734 nxt_fd_nonblocking(task, msg->fd[0]); in nxt_main_process_whoami_handler()
737 port->pair[1] = msg->fd[0]; in nxt_main_process_whoami_handler()
738 msg->fd[0] = -1; in nxt_main_process_whoami_handler()
766 msg->port_msg.stream, 0, buf); in nxt_main_process_whoami_handler()
770 if (msg->fd[0] != -1) { in nxt_main_process_whoami_handler()
771 nxt_fd_close(msg->fd[0]); in nxt_main_process_whoami_handler()
1110 nxt_main_port_socket_handler(nxt_task_t *task, nxt_port_recv_msg_t *msg) in nxt_main_port_socket_handler() argument
1121 port = nxt_runtime_port_find(task->thread->runtime, msg->port_msg.pid, in nxt_main_port_socket_handler()
1122 msg->port_msg.reply_port); in nxt_main_port_socket_handler()
1129 msg->port_msg.pid); in nxt_main_port_socket_handler()
1134 b = msg->buf; in nxt_main_port_socket_handler()
1173 nxt_port_socket_write(task, port, type, ls.socket, msg->port_msg.stream, in nxt_main_port_socket_handler()
1310 nxt_main_port_socket_unlink_handler(nxt_task_t *task, nxt_port_recv_msg_t *msg) in nxt_main_port_socket_unlink_handler() argument
1320 b = msg->buf; in nxt_main_port_socket_unlink_handler()
1408 nxt_main_port_modules_handler(nxt_task_t *task, nxt_port_recv_msg_t *msg) in nxt_main_port_modules_handler() argument
1425 if (msg->port_msg.pid != rt->port_by_type[NXT_PROCESS_DISCOVERY]->pid) { in nxt_main_port_modules_handler()
1426 nxt_alert(task, "process %PI cannot send modules", msg->port_msg.pid); in nxt_main_port_modules_handler()
1435 port = nxt_runtime_port_find(task->thread->runtime, msg->port_msg.pid, in nxt_main_port_modules_handler()
1436 msg->port_msg.reply_port); in nxt_main_port_modules_handler()
1440 msg->port_msg.stream, 0, NULL); in nxt_main_port_modules_handler()
1443 b = msg->buf; in nxt_main_port_modules_handler()
1454 b = nxt_buf_chk_make_plain(mp, b, msg->size); in nxt_main_port_modules_handler()
1584 nxt_main_port_conf_store_handler(nxt_task_t *task, nxt_port_recv_msg_t *msg) in nxt_main_port_conf_store_handler() argument
1597 if (nxt_slow_path(msg->port_msg.pid != ctl_port->pid)) { in nxt_main_port_conf_store_handler()
1598 nxt_alert(task, "process %PI cannot store conf", msg->port_msg.pid); in nxt_main_port_conf_store_handler()
1610 if (nxt_slow_path(msg->fd[0] == -1)) { in nxt_main_port_conf_store_handler()
1615 if (nxt_buf_mem_used_size(&msg->buf->mem) != sizeof(size_t)) { in nxt_main_port_conf_store_handler()
1617 (int) nxt_buf_mem_used_size(&msg->buf->mem)); in nxt_main_port_conf_store_handler()
1621 nxt_memcpy(&size, msg->buf->mem.pos, sizeof(size_t)); in nxt_main_port_conf_store_handler()
1623 p = nxt_mem_mmap(NULL, size, PROT_READ, MAP_SHARED, msg->fd[0], 0); in nxt_main_port_conf_store_handler()
1625 nxt_fd_close(msg->fd[0]); in nxt_main_port_conf_store_handler()
1626 msg->fd[0] = -1; in nxt_main_port_conf_store_handler()
1661 if (msg->fd[0] != -1) { in nxt_main_port_conf_store_handler()
1662 nxt_fd_close(msg->fd[0]); in nxt_main_port_conf_store_handler()
1663 msg->fd[0] = -1; in nxt_main_port_conf_store_handler()
1700 nxt_main_port_access_log_handler(nxt_task_t *task, nxt_port_recv_msg_t *msg) in nxt_main_port_access_log_handler() argument
1710 path = msg->buf->mem.pos; in nxt_main_port_access_log_handler()
1723 port = nxt_runtime_port_find(task->thread->runtime, msg->port_msg.pid, in nxt_main_port_access_log_handler()
1724 msg->port_msg.reply_port); in nxt_main_port_access_log_handler()
1728 msg->port_msg.stream, 0, NULL); in nxt_main_port_access_log_handler()