[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: FHS compliance and UNIX sockets



On Mon, 5 Feb 2001, Steve Greenland wrote:

> Date: Mon, 5 Feb 2001 13:28:35 -0600
> From: Steve Greenland <stevegr@debian.org>
> To: debian-devel@lists.debian.org
> Subject: Re: FHS compliance and UNIX sockets
> Resent-Date: Mon,  5 Feb 2001 20:29:11 +0100 (CET)
> Resent-From: debian-devel@lists.debian.org
> 
> On 02-Feb-01, 13:03 (CST), Daniel Jacobowitz <dan@debian.org> wrote: 
> > On Thu, Feb 01, 2001 at 08:47:43AM -0600, Steve Greenland wrote:
> > > 
> > > This turns out to have some interesting consequences. For example, I
> > > added TMPDIR support to "crontab -e", and it broke for some users,
> > > because emacs behaves differently when the path of the file being edited
> > > begins with "/tmp" vs other places. When it's in /tmp, emacs edits in
> > > place and copies to backup, otherwise it moves the original to backup
> > > and edits a copy, which broke crontabs check for if the file had been
> > > modified.
> > 
> > That really sounds like a bug in emacs; that's a subtler form of not
> > respecting TMPDIR.
> 
> Yes, but: emacs doesn't know it's TMPDIR, because crontab starts emacs
> with an explicit path to the file. Now, that emacs changes behaviour based
> on file location is arguably a bug, but I'm sure opinions will differ on
> that point.

I think you are both wrong. 
Emacs does not make any backup files in /tmp. And the behaviour of making
backup files by copying or renameing is controlled by three flags which
are off by default.
1) backup-by-copying: as the name says emacs makes backups by copying
   unconditionally. The other two flags are only effective if this flag is
   not set.
2) backup-by-copying-when-linked: If a file has hard links backups are
   made by copying else they are made by renameing.
3) backup-by-copying-when-mismatch: If newly created file would have
   a different owner or group from the original, backups are made by
   copying.

>From the view of an editor the files in /tmp are supposed to contain data
which are temporarily copied there by another program to be edited by that
editor. So I think this behaviour is perfectly correct.


-- 
PGP and GnuPG public keys available at http://germany.keyserver.net
PGP: 24B81049 Fingerprint: D7 10 EE 2B 74 16 C0 64  B4 5F BA B2 90 29 3D AF
GPG: 6B299971 Fingerprint: A598 A41F 57A3 5D69 83D2  8027 1274 F8CD 6B29 9971
+++ United States of America ... where you can get elected with less votes +++



Reply to: