Re: Emacs20 and mail file locking.
>>>>> "Rob" == Rob Browning <rlb@cs.utexas.edu> writes:
Rob> OK, then I'll assume that we want to hack emacs to use
Rob> liblockfile. This requires repeatedly calling touchlock() to
Rob> keep the lockfile from being deleted during the period when
Rob> the lock is being held. I think this may be a problem if
Rob> emacs grabs the lock (with maillock()), and then the user
Rob> suspends the program for more than 5 minutes (the default
Rob> timeout for maillock). When emacs resumes, the lockfile has
Rob> been deleted, but emacs still thinks it has the lock.
Please see the functions I wrote for working with `smartlist'
run-control files, at:
http://inetarena.com/~karlheg/Public/site-lisp/led-funcs.el
... That's tested in XEmacs; it shouldn't be too hard to port to GNU
Emacs.
If you hack XEmacs to use liblockfile, will you please conditionalize
it somehow and submit the patches to the xemacs-beta team?
Rob> The only simple way I can see around this problem is to have
Rob> emacs spawn a small process to keep touching the lockfile
Rob> (every 4 minutes or so) whenever it acquires the lock, and
Rob> kill that process when the lock is released. Does that seen
Rob> reasonable to everyone else?
That's essentially what my code does, using `itimer', `call-process'
and the `touch' program.
I don't think that Emacs ever locks a mail spool file itself.
`movemail' does that, and it already does dot-locking... Well, I
know that the XEmacs version does. I assume that the GNU Emacs one
does as well. If not, there's probably no reason why you can't use
the XEmacs version of `movemail' with both emacsen.
--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-devel-request@lists.debian.org .
Trouble? e-mail to templin@bucknell.edu .
Reply to: