Re: large file support? (fwd)

Martin von Loewis (martin@mira.isdn.cs.tu-berlin.de)
Sun, 17 Aug 1997 22:17:52 +0200


> To be able to use normal unix file redirection my shell has to be one
> of them however. Thats why its important that the applications continue
> to do the right thing, or as close as possible. "cat" for example works
> fine given a 64bit file and doing 32bit operations. Stuff like tail
> that does lseek won't. Thats why we want to stop the minimum number
> of operations.

I just read the reasoning in the LFS document for the 'open protection'.
In theory, cat could work on large files. In practice, they say, cat
implementations use fstat to determine whether input file and output
file are identical. If the file is larger than 2GB, this should fail.
So cat would fail on a large files even if the open protection would
be dropped.

Also, they say, letting it fail later on is no guarantee - because
applications are known to trust calls like fstat and lseek to succeed
if they are sure the file handle is valid. They would then silently
corrupt the file. They say that this has been actually observed on
real-world programs.

Now, we all know that such errors are never made in GNU software - but
this transitional compatibility is about commercial software, right?
:-)

Regards,
Martin