The quoted part could easily to be interpreted to mean that POSIX doesn't
mandate it, but that it happens to work on most implementation (that's
how I would have read it). The word "actually" is the clincher there, it
shouldn't be there if the standard mandate it.
Since the POSIX standards AFAIK isn't available on the net (for free)
I made a fast lookup in Single Unix Specification (v2, aka UNIX98)
instead, since that IS available for free on the Web and includes
POSIX...
The relevant part of their description is:
'If it was previously shorter than length, it is unspecified whether
the file is changed or its size increased.'
So, no, you can't PORTABLY use ftrucate()/truncate() to lengthen
files...
> And I think Bill Gallmeister ought to know what he's talking about ;-)
Possibly, but EVEN the wording you quote suggest that it might not be
standardized... So it's definitely possible he knew what he was
talking about :-)
-
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/