[BusyBox] seek_sub_file in unarchive.c broken?
Neal H Walfield
neal at cs.uml.edu
Sat Sep 22 03:57:29 UTC 2001
> I am using uClibc (CVS as of 9/18) together with Linux 2.4.6 (i386).
> It seems that uClibc implements lseek as a direct syscall. The C
> library shouldn't have an effect here.
>
> I am not sure, however, if one can use lseek with a pipe at all.
> The man page says the following:
[snip]
> The error occurs when you lseek beyond what's actually in the stream
> buffer of the pipe. Then it throws the ESPIPE error. Judging from the
> man page, this error tells that one should not use lseek with
> pipes. Maybe the man page is not detailled enough on this. Any ideas?
Here is what the Single Unix Specification version 2 has to say about
lseek:
The behaviour of lseek() on devices which are incapable of
seeking is implementation-dependent. The value of the file
offset associated with such a device is undefined.
More information about the busybox
mailing list