emacs-devel
[Top][All Lists]
Advanced

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

Re: expressions


From: Kim F. Storm
Subject: Re: expressions
Date: 07 Jan 2003 11:11:42 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

Bob Halley <address@hidden> writes:

> chad <address@hidden> writes:
> 
> > I would expect that the reason /tmp was chosen was the inability of some
> > systems to create sockets in NFS/AFS/SFS/Coda/whatever remote filesystem
> > that the suer might be using for $HOME.  

On a disk-less work station, even /tmp may be on a remote filesystem...

>                                            I suspect that this might still
> > be a problem.  The ssh/openssh technique involves creating a directory
> > in $TMPDIR named ssh-$unique (with other refinements that I think do not
> > apply).  Perhaps this would be a safer strategy?
> 
> Good point, though we don't want a unique name like SSH since we're
> trying to rendezvous on the name.  I tested creating sockets on an NFS
> mounted directory with Solaris and it worked, but I have no idea what
> happens with other platforms or filesystem types.
> 
> So, if we're using /tmp, and want to keep the UID in there for reasons
> RMS explained in another message, 

I didn't see that message...  Was it copied to the list?


>                                   maybe we want something like
> 
>         /tmp/.eserv-<UID>-<HOSTNAME>/server
> 
> which should cover us against pretty much everything :).

In that case, I would suggest naming it something like:

        /tmp/.emacs-UID/server-HOSTNAME

This would give us a standard place in /tmp/.emacs-UID for other
per-user stuff that we may need in the future.  The directory name
should be put in a new lisp variable, e.g. user-private-directory,
which is bound on start-up.

(defcustom user-private-directory (expand-file-name (format "/tmp/.emacs-%d" 
(user-uid)))
  "*Directory for user private files."
  :set (lambda (...)
        ... create & set modes on the directory if it doesn't exist ...)
  ...)


server.el could then use that variable to create the name of the socket.

(defvar server-socket-name
  (format "%s/server-%s" user-private-directory
          (substring (system-name) 0 (string-match "\\." (system-name)))))

-- 
Kim F. Storm <address@hidden> http://www.cua.dk





reply via email to

[Prev in Thread] Current Thread [Next in Thread]