Re: mcedit and file locking



On Mon, 25 Sep 2006, karl kappel segmueller de wrote:

ist there a way to prevent a file being edited with mcedit by different
users at the same time?

The MC editor has support for so called advisory locking. This
means that a lock is not enforced (say at the OS level) and
thus anyone can modify the file at any time. This locking scheme
relies on the fact that different processes trying to modify the
file will notice that a lock exists and act accordingly. In the
case of MC the lock is a dead symlink named in a specific way and
whose target contains the owner, the hostname and the pid of
the processes which locked the file. This locking scheme is
recognized by Jed and Emacs - maybe others too.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]