[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: emacs client/server mode hardcodes /tmp path
From: |
Ulrich Mueller |
Subject: |
Re: emacs client/server mode hardcodes /tmp path |
Date: |
Wed, 29 Oct 2008 10:28:10 +0100 |
>>>>> On Wed, 29 Oct 2008, Juanma Barranquero wrote:
>> + 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.
You really want to optimise this? ;-) If we assume that uid_t will
never have more than 64 bits, then a value of 28 should be sufficient
for the constant.
Ulrich (voting for 42)
- Re: emacs client/server mode hardcodes /tmp path, Ulrich Mueller, 2008/10/28
- Re: emacs client/server mode hardcodes /tmp path, Stefan Monnier, 2008/10/28
- Re: emacs client/server mode hardcodes /tmp path, Ulrich Mueller, 2008/10/29
- Re: emacs client/server mode hardcodes /tmp path, Juanma Barranquero, 2008/10/29
- Re: emacs client/server mode hardcodes /tmp path,
Ulrich Mueller <=
- Re: emacs client/server mode hardcodes /tmp path, Juanma Barranquero, 2008/10/29
- Re: emacs client/server mode hardcodes /tmp path, Stefan Monnier, 2008/10/29
- Re: emacs client/server mode hardcodes /tmp path, Juanma Barranquero, 2008/10/29
- Re: emacs client/server mode hardcodes /tmp path, Stefan Monnier, 2008/10/29
- Re: emacs client/server mode hardcodes /tmp path, Juanma Barranquero, 2008/10/29