Lines Matching defs:fd
745 int fd;
785 fd = open(okname, O_CREAT | O_RDWR | O_TRUNC, 0600);
786 if (fd < 0) {
793 close(fd);
815 int nb, fd;
825 if ((fd = open(filename, O_RDWR, 0)) < 0) {
829 set_cloexec_fd(fd);
833 if (fstat(fd, &statb) == -1) {
850 nb = read(fd, buf, BUFSIZ);
865 lseek(fd, pos, SEEK_SET);
866 nb = write(fd, zbuf, j);
879 fsync(fd);
881 close(fd);