Lines Matching defs:startfd
335 tls_exec_client(const char *user, int startfd, const char *srcaddr,
354 sockfd = startfd;
446 int startfd;
452 startfd = 3;
454 startfd = 0;
456 if (proto_descriptor(sock) != startfd) {
457 /* Move socketpair descriptor to descriptor number startfd. */
458 if (dup2(proto_descriptor(sock), startfd) == -1)
466 if (fcntl(startfd, F_SETFD, 0) == -1)
470 closefrom(startfd + 1);
472 if (asprintf(&startfdstr, "%d", startfd) == -1)
650 tls_exec_server(const char *user, int startfd, const char *privkey,
663 sockfd = startfd;
664 tcpfd = startfd + 1;
710 int startfd, sockfd, tcpfd, safefd;
714 startfd = 3;
716 startfd = 0;
725 safefd = MAX(safefd, startfd);
738 /* Move socketpair descriptor to descriptor number startfd. */
739 if (dup2(sockfd, startfd) == -1)
742 /* Move tcp descriptor to descriptor number startfd + 1. */
743 if (dup2(tcpfd, startfd + 1) == -1)
747 closefrom(startfd + 2);
753 if (fcntl(startfd, F_SETFD, 0) == -1)
755 if (fcntl(startfd + 1, F_SETFD, 0) == -1)
758 if (asprintf(&startfdstr, "%d", startfd) == -1)