Mail Archives: djgpp/1999/07/25/06:38:56
On Sat, 24 Jul 1999, Pavlos wrote:
> It seems that ftruncate will work only if the file pointer is before the
> position that I'm going to truncate from.
Please post the source of a short test program that exhibits this
behavior, and the data (file sizes shown by some utility) to
demonstrate the problem. I think `ftruncate' should work in this case
FYI, `ftruncate' moves the file pointer before truncating the file, so
its initial position should be irrelevant.
> I do close the file after ftruncate.
This is not necessary, actually, contrary to what the docs says.
- Raw text -