Lines Matching refs:fd
72 int fd; member
104 hctx->fd = -1; in cgi_handler_ctx_init()
425 if (hctx->fd != -1) { in cgi_connection_close()
465 static int cgi_write_request(handler_ctx *hctx, int fd);
669 static int cgi_write_request(handler_ctx *hctx, int fd) { in cgi_write_request() argument
680 ssize_t wr = chunkqueue_write_chunk_to_pipe(fd, cq, r->conf.errh); in cgi_write_request()
719 if (close(fd)) { in cgi_write_request()
720 log_perror(r->conf.errh, __FILE__, __LINE__, "cgi stdin close %d failed", fd); in cgi_write_request()
736 hctx->fdtocgi = fd; in cgi_write_request()
784 if (-1 == c->file.fd in cgi_create_env()
788 force_assert(-1 != c->file.fd); in cgi_create_env()
790 if (-1 == lseek(c->file.fd, 0, SEEK_SET)) { in cgi_create_env()
795 to_cgi_fds[0] = c->file.fd; in cgi_create_env()
911 int serrh_fd = r->conf.serrh ? r->conf.serrh->fd : -1; in cgi_create_env()
940 hctx->fd = from_cgi_fds[0]; in cgi_create_env()
960 close(hctx->fd); in cgi_create_env()
961 hctx->fd = -1; in cgi_create_env()
969 hctx->fdn = fdevent_register(ev, hctx->fd, cgi_handle_fdevent, hctx); in cgi_create_env()
970 if (-1 == fdevent_fcntl_set_nb(hctx->fd)) { in cgi_create_env()
1081 if (-1 == hctx->fd) return HANDLER_ERROR; /*(CGI not yet spawned)*/ in SUBREQUEST_FUNC()
1123 && !(hctx->conf.upgrade && -1 == hctx->fd in SUBREQUEST_FUNC()
1129 if (-1 == hctx->fd) { in SUBREQUEST_FUNC()