[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: A few questions about desktop.el
From: |
Stuart D. Herring |
Subject: |
Re: A few questions about desktop.el |
Date: |
Fri, 28 Apr 2006 22:02:15 -0700 (PDT) |
User-agent: |
SquirrelMail/1.4.3a-11.EL3 |
> I think it is somewhat dangerous to modify the file when reading it.
> My experience tells me that that can lead to various problems in weird
> cases, and it is much better if operations that only look at data
> are written so that they do not change anything.
>
> Can you use a different file name for the "in use" marker?
I'm curious about your experience/worries -- the file is opened twice, so
there's no seek issues, and the write is just an append. There's obvious
race conditions, but I don't think they're important (as I said
previously). And I was trying to avoid introducing another file for which
one would have to check for conflicts and such. But I suppose there's no
harm in having `desktop-lock-file-name', customizable but defaulted to
".emacs.desktop.lock" or so. It can hold the PID of the owner Emacs
process. Speaking of which, is there a way to see from Lisp if an
unrelated PID is running?
Davis
--
This product is sold by volume, not by mass. If it appears too dense or
too sparse, it is because mass-energy conversion has occurred during
shipping.