all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* A question about file lock
@ 2013-06-10  7:23 Xue Fuqiao
  2013-06-10 15:26 ` Eli Zaretskii
  0 siblings, 1 reply; 2+ messages in thread
From: Xue Fuqiao @ 2013-06-10  7:23 UTC (permalink / raw)
  To: emacs-devel

Hi list,

I have a question regarding file locks.  In (info "(elisp) File Locks"):

 -- Function: unlock-buffer
[...]
     If the buffer is not modified, then the file should not be locked,
     so this function does nothing.

What if Emacs or the operating system crashes?  Will the lock files
disappear?  If not, after the crash, does this function work?

--
Best regards, Xue Fuqiao.



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: A question about file lock
  2013-06-10  7:23 A question about file lock Xue Fuqiao
@ 2013-06-10 15:26 ` Eli Zaretskii
  0 siblings, 0 replies; 2+ messages in thread
From: Eli Zaretskii @ 2013-06-10 15:26 UTC (permalink / raw)
  To: Xue Fuqiao; +Cc: emacs-devel

> Date: Mon, 10 Jun 2013 15:23:59 +0800
> From: Xue Fuqiao <xfq.free@gmail.com>
> 
>  -- Function: unlock-buffer
> [...]
>      If the buffer is not modified, then the file should not be locked,
>      so this function does nothing.
> 
> What if Emacs or the operating system crashes?  Will the lock files
> disappear?

No.

> If not, after the crash, does this function work?

Yes.  The information recorded in the name of the lock file includes
the system start time, so Emacs knows that the lock file is stale and
ignores it.



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-06-10 15:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-10  7:23 A question about file lock Xue Fuqiao
2013-06-10 15:26 ` Eli Zaretskii

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.