> The sed on my system, which is quite old, not from a standards
> distribution, does, indeed do lseek to find the file-size. Your
> version does 'fstat' which will accomplish the same thing. Typically
> a program that does 'lseek(0, SEEK_CUR)` expects to have the correct
> return value or errno be set to ESPIPE which lets it know that it's
> a pipe, socket, or fifo. This lets it work with such.
Optimizing this useless lseek(2) away was one of the libc changes during
the last ages.
Ralf
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/