[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: backup method
From: |
Richard Stallman |
Subject: |
Re: backup method |
Date: |
Thu, 27 Jan 2005 17:18:57 -0500 |
The default backup method is mv and then create a new file. That's
nice if you really want to keep the timestamp intact. But if you
use emacs with crontab -e you remove the tmpfile and since the
filedescriptor is still open your update to your cron is lost --
without warning. It was pretty hard to discover why this happened.
So I would like to suggest to make backup by copying the default.
I won't change it in general, but we could probably arrange to use
backup by copying for *this specific case*. Can you give a precise
recipe for distinguishing this case--a regexp for these file names,
perhaps?
If the file is open ie another program has fopen'ed the file then
you have an exceptional case.
lsof and fstat ( for BSD ) can detect open file descriptors. I
suppose emacs can do the same.
It is not the case in general that the existence of other descriptors
means it is better to backup by copying. That's what you want in this
particular case, for crontab files. However, in other cases where
another program is reading the old version, it should be able to
continue reading the old version, and editing the file should not
interfere with it.
- backup method, Han Boetes, 2005/01/26
- Re: backup method, Luc Teirlinck, 2005/01/26
- Re: backup method, Miles Bader, 2005/01/26
- Re: backup method, Luc Teirlinck, 2005/01/26
- Re: backup method, Han Boetes, 2005/01/26
- Re: backup method,
Richard Stallman <=
- Re: backup method, Han Boetes, 2005/01/27
- Re: backup method, Richard Stallman, 2005/01/28
- Re: backup method, Han Boetes, 2005/01/29
- Re: backup method, Luc Teirlinck, 2005/01/29
- Re: backup method, Stefan Monnier, 2005/01/29
- Re: backup method, Luc Teirlinck, 2005/01/29
- Re: backup method, Luc Teirlinck, 2005/01/29
- Re: backup method, Luc Teirlinck, 2005/01/29
- Re: backup method, Luc Teirlinck, 2005/01/29
- Re: backup method, Luc Teirlinck, 2005/01/29