Lines Matching refs:fd
3284 int fd;
3324 ** We also compare the fd numbers here since OutChannel
3353 fd = open(SM_PATH_DEVNULL, O_WRONLY, 0666);
3354 if (fd == -1)
3361 if (fd >= 0)
3363 (void) dup2(fd, STDOUT_FILENO);
3364 (void) dup2(fd, STDERR_FILENO);
3365 (void) close(fd);
3890 ** fd -- the file descriptor to be filled.
3903 fill_fd(fd, where)
3904 int fd;
3910 if (fstat(fd, &stbuf) >= 0 || errno != EBADF)
3914 syserr("fill_fd: %s: fd %d not open", where, fd);
3916 MissingFds |= 1 << fd;
3917 i = open(SM_PATH_DEVNULL, fd == 0 ? O_RDONLY : O_WRONLY, 0666);
3923 if (fd != i)
3925 (void) dup2(i, fd);