Path: utzoo!attcan!uunet!cs.utexas.edu!tut.cis.ohio-state.edu!bloom-beacon!bu-cs!att!ihlpa!sft From: sft@ihlpa.ATT.COM (Scott Thompson) Newsgroups: comp.unix.wizards Subject: Atomic file truncation Message-ID: Date: 12 May 89 18:34:02 GMT Sender: sft@ihlpa.ATT.COM Distribution: comp Organization: AT&T Bell Laboratories, Naperville, Illinois Lines: 17 I want to read, process and write, a possibly smaller (truncate), mail file in a single locked open. Currently I can read, process and write the file originally opened with fopen and "r+", but it will not truncate if the new file is shorter; I also tried other combinations along with open, but they truncate the file prior to reading! This is for use under SYSV for file locking a mail file. Any and all suggestions will be appreciated. Thanks -- -- Scott Thompson (IH 6W-207), AT&T Bell Labs, Naperville, Il. 60566 VOICE: (312)-979-2237 UUCP: ...!att!ihlpa!sft