Messages in this thread | | | Date | Wed, 28 Apr 1999 01:47:29 +0200 | From | Ralf Baechle <> | Subject | Re: sed not working on /proc files |
| |
On Mon, Apr 26, 1999 at 07:29:04PM -0400, Richard B. Johnson wrote:
> 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/
| |