Lines Matching defs:fd
60 #define CLOSED -1 /* fd was not open before redir */
108 int fd;
129 fd = n->nfile.fd;
130 if (fd == 0)
133 n->ndup.dupfd == fd)
136 if ((flags & REDIR_PUSH) && sv->renamed[fd] == EMPTY) {
138 if ((i = fcntl(fd, F_DUPFD_CLOEXEC, 10)) == -1) {
145 error("%d: %s", fd, strerror(errno));
149 sv->renamed[fd] = i;
168 int fd = redir->nfile.fd;
173 memory[fd] = 0;
219 memory[fd] = 1;
221 if (dup2(redir->ndup.dupfd, fd) < 0)
226 close(fd);
236 if (f != fd) {
237 if (dup2(f, fd) == -1) {
240 error("%d: %s", fd, strerror(e));
332 /* Return true if fd 0 has already been redirected at least once. */