From: jum@anubis.han.de (Jens-Uwe Mager)
To: unlisted-recipients:; (no To-header on input)@pop.zip.com.au
Subject: Re: ftruncate not extending files?
Date: Sat, 3 Mar 2001 00:41:14 +0100 [thread overview]
Message-ID: <slrn9a0bjn.o1.jum@anubis.han.de> (raw)
In-Reply-To: <mng==Pine.LNX.4.30.0103011502050.23650-100000@swamp.bayern.net> <E14YXft-0008GK-00@the-village.bc.nu> <20010302084544.A26070@home.ds9a.nl> <mng==20010302095701.A4685@sable.ox.ac.uk>
On Fri, 2 Mar 2001 10:17:14 GMT, Malcolm Beattie <mbeattie@sable.ox.ac.uk> 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:
>
> http://www.opengroup.org/onlinepubs/007908799/xsh/ftruncate.html
>
> 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
truncate.
--
Jens-Uwe Mager <pgp-mailto:62CFDB25>
prev parent reply other threads:[~2001-03-02 23:37 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-02-25 20:08 fat problem in 2.4.2 James D Strandboge
2001-02-25 20:20 ` Alan Cox
2001-03-01 14:25 ` Peter Daum
2001-03-01 15:09 ` [PATCH] " Alexander Viro
2001-03-02 0:21 ` Albert D. Cahalan
2001-03-01 18:19 ` Alan Cox
2001-03-01 19:39 ` [CFT][PATCH] " Alexander Viro
2001-03-01 20:05 ` Linus Torvalds
2001-03-01 20:52 ` Chris Mason
2001-03-01 20:56 ` Roman Zippel
2001-03-01 21:07 ` Alexander Viro
2001-03-01 21:27 ` Roman Zippel
2001-03-02 7:45 ` ftruncate not extending files? bert hubert
2001-03-02 9:57 ` Malcolm Beattie
2001-03-02 10:56 ` Dmitry A. Fedorov
2001-03-02 14:15 ` Hugh Dickins
2001-03-03 19:32 ` Kai Henningsen
[not found] ` <mng==20010302095701.A4685@sable.ox.ac.uk>
2001-03-02 23:41 ` Jens-Uwe Mager [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=slrn9a0bjn.o1.jum@anubis.han.de \
--to=jum@anubis.han.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox