From xemacs-m  Thu Jul 10 12:59:12 1997
Received: from cnri.reston.va.us (cnri.CNRI.Reston.VA.US [132.151.1.1])
	by xemacs.org (8.8.5/8.8.5) with ESMTP id MAA10227
	for <xemacs-beta@xemacs.org>; Thu, 10 Jul 1997 12:59:12 -0500 (CDT)
Received: from newcnri.CNRI.Reston.Va.US (newcnri [132.151.1.84]) by cnri.reston.va.us (8.8.5/8.7.3) with SMTPid OAA18650 for <xemacs-beta@xemacs.org>; Thu, 10 Jul 1997 14:02:24 -0400 (EDT)
Received: from anthem.CNRI.Reston.Va.US by newcnri.CNRI.Reston.Va.US (SMI-8.6/SMI-SVR4)
	id OAA24901; Thu, 10 Jul 1997 14:03:34 -0400
Received: by anthem.CNRI.Reston.Va.US (SMI-8.6/SMI-SVR4)
	id OAA07461; Thu, 10 Jul 1997 14:02:28 -0400
Date: Thu, 10 Jul 1997 14:02:28 -0400
Message-Id: <199707101802.OAA07461@anthem.CNRI.Reston.Va.US>
From: "Barry A. Warsaw" <bwarsaw@CNRI.Reston.Va.US>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
To: xemacs-beta@xemacs.org
Subject: filelock.c
X-Mailer: VM 6.32 under 20.3 "Sofia" XEmacs  Lucid (beta9)
Reply-To: bwarsaw@python.org
X-Attribution: BAW
X-Oblique-Strategy: Mute and continue
X-Url: http://www.python.org/~bwarsaw


Has anybody thought about changing the way files are locked
(e.g. filelock.c) in XEmacs?  The current approach, sync'd with 19.30
is very troublesome when XEmacs is maintained in a networked
environment over NFS.  I don't know that Emacs 20's approach is any
better, but it is definitely different.

The XEmacs problem comes about in lock_superlock() when lock-directory
is on an NFS partition.  We were seeing ~ 20 second freezes in XEmacs
when it tried to write a file and it was confusing the hell out of me
until I traced the freeze to the loop in lock_superlock().  Sure
enough I can watch this loop cruise through 20 times, sleeping 1
second per iteration, with the user loosing all control in the
interim.  Bad, bad, bad.

Okay, you can complain that Emacs shouldn't cater to our pokey NFS
server or network.  I can complain about them too, but still, XEmacs
should be more robust.

I am tempted to set lock-directory to the local file system for all my
users.  We've observed that the vast majority of shared files we hack
on are under RCS, so it's locking mechanism should detect clashes.
Most of the projects we work on use CVS so we have our own individual
files we touch, with very little practical chance of conflicts.

This is a persistent problem for my fellow XEmacsers.  Has anybody
else observed these problems, dealt with them in some way, or looked
into adapting Emacs 20's filelock.c to XEmacs 20 perhaps?

-Barry

