Lines Matching refs:fd
131 int fd;
137 if ((fd = open(file, O_RDONLY)) == -1) {
144 fd = STDIN_FILENO;
159 while ((len = read(fd, buf, _MAXBSIZE)) > 0) {
183 while ((len = read(fd, buf, _MAXBSIZE)) > 0) {
204 if (fstat(fd, &sbuf)) {
213 while ((len = read(fd, buf, _MAXBSIZE)) > 0)
225 else if ((stream = fdopen(fd, "r")) == NULL) {
227 close(fd);
271 if ((stream == NULL ? close(fd) : fclose(stream)) != 0) {