Lines Matching refs:fds
57 int fds[_FD_MAX]; member
419 length = recv(resolve->fds[REQUEST_RECV_FD], &buf, sizeof buf, 0); in thread_worker()
429 … if (handle_request(resolve->fds[RESPONSE_SEND_FD], &buf.packet, (size_t) length) < 0) in thread_worker()
433 send_died(resolve->fds[RESPONSE_SEND_FD]); in thread_worker()
497 resolve->fds[i] = -1; in sd_resolve_new()
499 if (socketpair(AF_UNIX, SOCK_DGRAM|SOCK_CLOEXEC, 0, resolve->fds + REQUEST_RECV_FD) < 0) in sd_resolve_new()
502 if (socketpair(AF_UNIX, SOCK_DGRAM|SOCK_CLOEXEC, 0, resolve->fds + RESPONSE_RECV_FD) < 0) in sd_resolve_new()
506 resolve->fds[i] = fd_move_above_stdio(resolve->fds[i]); in sd_resolve_new()
508 (void) fd_inc_sndbuf(resolve->fds[REQUEST_SEND_FD], QUERIES_MAX * BUFSIZE); in sd_resolve_new()
509 (void) fd_inc_rcvbuf(resolve->fds[REQUEST_RECV_FD], QUERIES_MAX * BUFSIZE); in sd_resolve_new()
510 (void) fd_inc_sndbuf(resolve->fds[RESPONSE_SEND_FD], QUERIES_MAX * BUFSIZE); in sd_resolve_new()
511 (void) fd_inc_rcvbuf(resolve->fds[RESPONSE_RECV_FD], QUERIES_MAX * BUFSIZE); in sd_resolve_new()
513 (void) fd_nonblock(resolve->fds[RESPONSE_RECV_FD], true); in sd_resolve_new()
580 if (resolve->fds[REQUEST_SEND_FD] >= 0) { in resolve_free()
589 (void) send(resolve->fds[REQUEST_SEND_FD], &req, req.length, MSG_NOSIGNAL); in resolve_free()
598 close_many(resolve->fds, _FD_MAX); in resolve_free()
609 return resolve->fds[RESPONSE_RECV_FD]; in sd_resolve_get_fd()
848 l = recv(resolve->fds[RESPONSE_RECV_FD], &buf, sizeof buf, 0); in sd_resolve_process()
875 r = fd_wait_for_event(resolve->fds[RESPONSE_RECV_FD], POLLIN, timeout_usec); in sd_resolve_wait()
978 if (sendmsg(resolve->fds[REQUEST_SEND_FD], &mh, MSG_NOSIGNAL) < 0) in resolve_getaddrinfo_with_destroy_callback()
1067 if (sendmsg(resolve->fds[REQUEST_SEND_FD], &mh, MSG_NOSIGNAL) < 0) in resolve_getnameinfo_with_destroy_callback()
1267 …r = sd_event_add_io(resolve->event, &resolve->event_source, resolve->fds[RESPONSE_RECV_FD], POLLIN… in sd_resolve_attach_event()