Path: utzoo!mnetor!tmsoft!torsqnt!jarvis.csri.toronto.edu!rutgers!iuvax!purdue!haven!mimsy!chris
From: chris@mimsy.UUCP (Chris Torek)
Newsgroups: comp.unix.questions
Subject: Re: Set file size in SYSV
Keywords: How
Message-ID: <19072@mimsy.UUCP>
Date: 14 Aug 89 18:29:14 GMT
References: <708@msa3b.UUCP> <18lG02Em4aQn01@amdahl.uts.amdahl.com>
Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742
Lines: 14

In article <18lG02Em4aQn01@amdahl.uts.amdahl.com> kucharsk@uts.amdahl.com
(William Kucharski) writes:
>int
>ftruncate(fd, length)
[much deleted]
>	if (filebuf.st_size < length) {
>		/* extend file length */

The 4BSD ftruncate() call will not extend files.  (If it did,
it would probably have been called `fsetsize'; and a function
like this one should probably be so called.)
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163)
Domain:	chris@mimsy.umd.edu	Path:	uunet!mimsy!chris