- if (fstat(out.fd, &sb))
- err("%s: %s", out.name, strerror(errno));
- if (S_ISCHR(sb.st_mode))
- out.flags |= ioctl(out.fd, MTIOCGET, &mt) ? ISCHR : ISTAPE;
- else if (lseek(out.fd, (off_t)0, SEEK_CUR) == -1 && errno == ESPIPE)
- out.flags |= ISPIPE; /* XXX fixed in 4.4BSD */