www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1999/07/18/04:37:56

Date: Sun, 18 Jul 1999 11:20:55 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: djgpp-workers AT delorie DOT com
Subject: ftruncate
Message-ID: <Pine.SUN.3.91.990718111857.19517M-100000@is>
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com

I've seen code in some GNU package which seems to imply that
`ftruncate' doesn't move the file pointer position.  Our
implementation does.  I am not sure  whether this is a bug in the
GNU application or in our implementation.  One Unix box says in
the man page that the file pointer is left unaltered, but the rest
keep silent.  Could someone please see how does `ftruncate' behave
on Unix/Linux?

And while at that: since `ftruncate' is in man2, it probably means
that it is a system call.  If so, would it be reasonable to have a
separate FSEXT number for it?  I mean, some extensions could support
truncation, but not lseek, right?  Also, short of looking into
sources, there's no easy way for an application programmer to know
that `ftruncate' is an `lseek' followed by `_write'.  Comments?

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019