Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!pasteur!ucbvax!decwrl!purdue!bu-cs!att!ihlpa!sft From: sft@ihlpa.ATT.COM (Scott Thompson) Newsgroups: comp.unix.questions Subject: Truncating a file Message-ID: Date: 10 May 89 16:19:51 GMT Sender: sft@ihlpa.ATT.COM Distribution: comp Organization: AT&T Bell Laboratories, Naperville, Illinois Lines: 18 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