[email protected]
[Top] [All Lists]

Re: mcedit and file locking

Subject: Re: mcedit and file locking
From: Pavel Tsekov
Date: Mon, 25 Sep 2006 16:12:05 +0300 EEST
On Mon, 25 Sep 2006, [email protected] 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.

_______________________________________________
Mc mailing list
http://mail.gnome.org/mailman/listinfo/mc

<Prev in Thread] Current Thread [Next in Thread>