Set file size in SYSV

Chris Torek chris at mimsy.UUCP
Tue Aug 15 04:29:14 AEST 1989


In article <18lG02Em4aQn01 at amdahl.uts.amdahl.com> kucharsk at 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 at mimsy.umd.edu	Path:	uunet!mimsy!chris



More information about the Comp.unix.questions mailing list