Lines Matching refs:rfd
52 int rfd;
59 if ((rfd = open(f->st->st_size ? f->path : "/dev/null", O_RDONLY|O_BINARY)) < 0)
61 return rfd;
69 if ((rfd = open(state.tmp.file, O_RDONLY|O_BINARY)) < 0)
103 close(rfd);
117 close(rfd);
122 while ((n = read(proc->rfd, state.tmp.buffer, state.buffersize)) > 0)
141 return rfd;
153 int rfd;
156 rfd = -1;
158 rfd = apply(ap, f, fp);
159 else if ((rfd = open(f->st->st_size ? f->path : "/dev/null", O_RDONLY|O_BINARY)) < 0)
164 if (lseek(rfd, (off_t)0, SEEK_SET) != 0)
168 while ((n = read(rfd, state.tmp.buffer, state.buffersize)) > 0)
172 if (lseek(rfd, (off_t)0, SEEK_SET) != 0)
176 if (rfd < 0)
178 return rfd;
1392 int rfd;
1397 if ((rfd = open(state.tmp.file, O_RDONLY|O_BINARY)) < 0)
1417 if (ap->io->fd || (ap->io->fd = dup(rfd)) < 0)
1418 ap->io->fd = rfd;
1420 close(rfd);