[lkml]   [2001]   [Mar]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: ftruncate not extending files?
    On Fri, 2 Mar 2001 10:17:14 GMT, Malcolm Beattie <> wrote:
    >bert hubert writes:
    >> I would've sworn, based on the fact that I saw people do it, that ftruncate
    >> was a legitimate way to extend a file
    >Well it's not SuSv2 standards compliant:
    > If the file previously was larger than length, the extra data is
    > discarded. If it was previously shorter than length, it is
    > unspecified whether the file is changed or its size increased. If
    > ^^^^^^^^^^^
    > the file is extended, the extended area appears as if it were
    > zero-filled.
    >How "legitimate" relates to "SuSv2 standards compliant" is your call.

    It is interesting to compare the wording of the Solaris man page, it
    sounds pretty much like the SuSv2 paragraph above, but without the
    restriction that the result is unspecified, it guarantees the extending
    is a legitimate operation. Sounds like the SuSv2 authors chickened out
    on that issue, most of the Unix platforms I know (including SunOS 4&5,
    HP/UX, IRIX, Tru64, AIX and various *BSD) do happily extend a file on

    Jens-Uwe Mager <pgp-mailto:62CFDB25>

    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 13:29    [W:0.020 / U:19.460 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site