Lines Matching refs:fd
91 int fd; /* file descriptor (or -1 if string) */
179 return parsefile != NULL && parsefile->fd == 0;
191 if (parsefile->fd == 0 && el) {
214 if (parsefile->fd == 0) {
252 nr = read(parsefile->fd, buf, BUFSIZ - 8);
259 if (parsefile->fd == 0 && errno == EWOULDBLOCK) {
350 if (parsefile->fd == 0 && hist && something) {
435 int fd;
439 if ((fd = open(fname, O_RDONLY)) < 0)
441 if (fd < 10) {
442 fd2 = copyfd(fd, 10);
443 close(fd);
446 fd = fd2;
448 setinputfd(fd, push);
459 setinputfd(int fd, int push)
461 (void) fcntl(fd, F_SETFD, FD_CLOEXEC);
466 if (parsefile->fd > 0)
467 close(parsefile->fd);
468 parsefile->fd = fd;
511 pf->fd = -1;
524 if (pf->fd >= 0)
525 close(pf->fd);
573 if (parsefile->fd > 0) {
574 close(parsefile->fd);
575 parsefile->fd = 0;