Lines Matching refs:sock_fd
499 int sock_fd = kill_sock_fd;
500 if (sock_fd >= 0)
501 close (sock_fd);
545 int open_server (bool ip6, int sock_fd)
551 int client_fd = accept4 (sock_fd, ip6 ? (sockaddr *)&addr : nullptr,
554 int client_fd = accept (sock_fd, ip6 ? (sockaddr *)&addr : nullptr, &addr_len);
591 server (bool ipv6, int sock_fd, module_resolver *resolver)
600 my_epoll_ctl (epoll_fd, EPOLL_CTL_ADD, EPOLLIN, sock_fd, 0);
625 while (sock_fd >= 0 || live)
644 if (sock_fd >= 0
647 FD_SET (sock_fd, &readers);
648 limit = sock_fd + 1;
756 if (active < 0 && sock_fd >= 0 && FD_ISSET (sock_fd, &readers))
770 my_epoll_ctl (epoll_fd, EPOLL_CTL_ADD, EPOLLIN, sock_fd, 0);
776 int fd = open_server (ipv6, sock_fd);
802 if (sock_fd >= 0
805 /* Stop paying attention to sock_fd. */
806 my_epoll_ctl (epoll_fd, EPOLL_CTL_DEL, EPOLLIN, sock_fd, 0);
809 close (sock_fd);
810 sock_fd = -1;
820 gcc_assert (sock_fd < 0);
916 int sock_fd = -1; /* Socket fd, otherwise stdin/stdout. */
922 sock_fd = maybe_parse_socket (name, &r);
972 if (sock_fd >= 0)
974 server (name[0] != '=', sock_fd, &r);