[uClibc]fseek(3) idempotency

Matt Kraai kraai at alumni.carnegiemellon.edu
Mon Sep 24 22:50:47 UTC 2001


On Mon, Sep 24, 2001 at 04:45:11PM -0600, Erik Andersen wrote:
> Pulling out my copy of Posix/IEEE 1003.1b-1993, and it seems to agree
> with SuS2:
> 
> Some devices are incapable of seeking.  The value of the file offset associated
> with such a device is undefined.  The behavior of the lseek() function on such
> devices is implementation defined.
> 
> ...Otherwise, it shall return a value of ((off_t)-1), shall set errno to
> indicate the error, and the file offset shall remain unchanged by this function
> call.

So if you don't know a priori that a file is not a pipe, you can't
call [fl]seek on it?  This is retarded.

Matt





More information about the uClibc mailing list