Lines Matching refs:fd
66 #define CLOSED -1 /* fd was not open before redir */
114 int fd;
135 fd = n->nfile.fd;
136 if (fd == 0)
139 n->ndup.dupfd == fd)
142 if ((flags & REDIR_PUSH) && sv->renamed[fd] == EMPTY) {
144 if ((i = fcntl(fd, F_DUPFD_CLOEXEC, 10)) == -1) {
151 error("%d: %s", fd, strerror(errno));
155 sv->renamed[fd] = i;
174 int fd = redir->nfile.fd;
179 memory[fd] = 0;
225 memory[fd] = 1;
227 if (dup2(redir->ndup.dupfd, fd) < 0)
232 close(fd);
242 if (f != fd) {
243 if (dup2(f, fd) == -1) {
246 error("%d: %s", fd, strerror(e));
338 /* Return true if fd 0 has already been redirected at least once. */