Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!topaz.rutgers.edu!ron From: ron@topaz.rutgers.edu.UUCP Newsgroups: comp.unix.wizards Subject: Re: a creat() hack Message-ID: <14533@topaz.rutgers.edu> Date: Tue, 8-Sep-87 00:11:20 EDT Article-I.D.: topaz.14533 Posted: Tue Sep 8 00:11:20 1987 Date-Received: Wed, 9-Sep-87 00:46:08 EDT References: <3921@cit-vax.Caltech.Edu> Organization: Rutgers Univ., New Brunswick, N.J. Lines: 10 Keywords: creat truncate versions efficiency We use the deferred truncate property to make cp/rcp totally fool proof for dunderheads who like to copy files on top of themselves (note you can not check for this in rcp or with remote file systems). The way we did it is to open files that exits rather than always creating over them. When we are finished we truncate them to the right length. The user gets what he asked for, each block is read and written back into the same place, but the file is not destroyed. -Ron