Those are not ill-formed programs, they are just ordinary programs.
ftruncate()-to-extend and mmap() go together like knife and fork:
you don't have to use either, and you can use each separately, but
it's conventional to use them together. The awkward SIGBUS-beyond-EOF
specification of mmap() begs for a call to set filesize; often the man
page of one syscall references the other.
It would be perverse and unhelpful for Linux to offer a filesystem
which supports mmap() but not ftrunctate()-to-extend.
The SuSv2 quotations, above and in other mail, are just weasly.
They probably started off specifying the natural least-surprise
behaviours, which most support; but some vendor who failed to meet
that spec forced the wording to be changed to "unspecified".
That's no reason for Linux to be obstinate.
But I agree "ftruncate" is a confusing name for a syscall to
(truncate or) extend a file: like using a knife to spread glue.
Hugh
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/