Article View: gnu.emacs.bug
Article #87188[19.27]: NFS filelocking should use file's truename directory
From: Kevin Broadey
Date: Thu, 13 Oct 1994 05:11
Date: Thu, 13 Oct 1994 05:11
41 lines
2184 bytes
2184 bytes
I've rebuilt my emacs-19.27 with Karl Berry's NFS filelocking patch. It isn't as robust as it could be as it doesn't use the visited file's truename as the basis for the lockfile name. For example, in a junk directory do the following:- touch junk.junk ln -s junk.junk junk2.junk Now edit junk.junk and junk2.junk from 2 separate emacs processes. Modify junk.junk - the lockfile .#junk.junk gets created. Modify junk2.junk - no error is signalled. Instead, lockfile .#junk2.junk gets created. Of course, emacs still does its modification time checking when you attempt to save either buffer, but this is catching the problem later than it could be caught it the lockfile was based in the file's truename. Just to get into the religious debate about whether this is The Right Way to do file locking under NFS, here are a couple of points I'd like to make:- 1) IT WORKS! (most of the time, directory permissions being the stumbling block). 2) Emacs has already set a precedent of assuming that it can create files in the visited file's directory. This is how it handles backup and autosave files (yes, I do know that backup files go to the user's home directory if the file's directory is not writable). 3) In the event of Emacs being unable to create a lockfile there is still the fallback check on file modification times, so Karl's changes don't make things any worse than they are now. -- Kevin
Technical Details
Message-ID:
<9410120845.AA18508@bartley>Path:
arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!openwx!eskimo!mvb.saic.com!MathWorks.Com!europa.eng.gtefsd.com!howland.reston.ans.net!math.ohio-state.edu!cis.ohio-state.edu!bartley.DEmon.co.UK!KevinBShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fb2f1,863089a52be0ca3c,start X-Google-Attributes: gidfb2f1,public X-Google-ArrivalTime: 1994-10-13 06:40:51 PST Path: arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!openwx!eskimo!mvb.saic.com!MathWorks.Com!europa.eng.gtefsd.com!howland.reston.ans.net!math.ohio-state.edu!cis.ohio-state.edu!bartley.DEmon.co.UK!KevinB From: KevinB@bartley.DEmon.co.UK (Kevin Broadey) Newsgroups: gnu.emacs.bug Subject: [19.27]: NFS filelocking should use file's truename directory Date: 13 Oct 1994 01:11:07 -0400 Organization: GNUs Not Usenet Lines: 41 Sender: daemon@cis.ohio-state.edu Approved: bug-gnu-emacs@prep.ai.mit.edu Distribution: gnu Message-ID: <9410120845.AA18508@bartley>