Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!ogicse!pdxgate!eecs!kirkenda From: kirkenda@eecs.cs.pdx.edu (Steve Kirkendall) Newsgroups: comp.os.minix Subject: Re: File locking in MINIX and UNIX Message-ID: <1661@pdxgate.UUCP> Date: 18 Feb 91 20:26:58 GMT References: <39313@cup.portal.com> Sender: news@pdxgate.UUCP Reply-To: kirkenda@eecs.UUCP (Steve Kirkendall) Organization: Portland State University, Portland, OR Lines: 17 In article <39313@cup.portal.com> Kenyon_F_Karl@cup.portal.com writes: >Thus, my immediate problem is that rebooting the system while 'elvis' was >still running left a temporary file in /usr/tmp. When 'elvis' found the >file after the reboot, it thought that the file was still being edited. >Running the command 'rm /usr/tmp/*' as 'superuser' removed the temp file. The file in /usr/tmp is more than just a lock file. It is used to contain a copy of the file being edited, with extra space inserted to make editing faster. Whenever Elvis dies for any reason (system crash, elvis bug, lost carrier, power failure, etc.) the "virec" program can be used to recover the changed text that is stored in that temporary file. The fact that this file acts as a lock file is really just an unfortunate consequense of the method Elvis uses for filename generation. I plan to remove that limitation soon. ------------------------------------------------------------------------------- Steve Kirkendall kirkenda@cs.pdx.edu Grad student at Portland State U.