all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Juanma Barranquero" <lekktu@gmail.com>
To: "Ulrich Mueller" <ulm@gentoo.org>
Cc: Diego Petteno <flameeyes@gmail.com>,
	emacs-devel@gnu.org, Stefan Monnier <monnier@iro.umontreal.ca>,
	emacs@gentoo.org
Subject: Re: emacs client/server mode hardcodes /tmp path
Date: Wed, 29 Oct 2008 10:15:43 +0100	[thread overview]
Message-ID: <f7ccd24b0810290215xe8f4c3eme301ab59ce93b57c@mail.gmail.com> (raw)
In-Reply-To: <18696.5661.523071.167994@a1ihome1.kph.uni-mainz.de>

On Wed, Oct 29, 2008 at 08:51, Ulrich Mueller <ulm@gentoo.org> wrote:

> -       socket_name = alloca (100 + strlen (server_name));
> -       sprintf (socket_name, "/tmp/emacs%d/%s",
> -                (int) geteuid (), server_name);
> +       tmpdir = egetenv ("TMPDIR");
> +       if (!tmpdir)
> +         tmpdir = "/tmp";
> +       socket_name = alloca (96 + strlen (tmpdir) + strlen (server_name));
> +       sprintf (socket_name, "%s/emacs%d/%s",
> +                tmpdir, (int) geteuid (), server_name);

There was neither much point in allocating an extra 100 bytes, nor in
allocating 96 now. The formatted uid is not going to be 88 characters
long.

  Juanma




  reply	other threads:[~2008-10-29  9:15 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-06 15:43 emacs client/server mode hardcodes /tmp path Diego 'Flameeyes' Pettenò
2008-03-06 17:48 ` Stefan Monnier
2008-03-06 17:58   ` Diego 'Flameeyes' Pettenò
2008-10-28 13:38   ` Ulrich Mueller
2008-10-28 14:29     ` Stefan Monnier
2008-10-29  7:51       ` Ulrich Mueller
2008-10-29  9:15         ` Juanma Barranquero [this message]
2008-10-29  9:28           ` Ulrich Mueller
2008-10-29  9:37             ` Juanma Barranquero
2008-10-29 14:41               ` Stefan Monnier
2008-10-29 14:55                 ` Juanma Barranquero
2008-10-29 15:03                   ` Stefan Monnier
2008-10-29 15:12                     ` Juanma Barranquero

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f7ccd24b0810290215xe8f4c3eme301ab59ce93b57c@mail.gmail.com \
    --to=lekktu@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=emacs@gentoo.org \
    --cc=flameeyes@gmail.com \
    --cc=monnier@iro.umontreal.ca \
    --cc=ulm@gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.