From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ulrich Mueller Newsgroups: gmane.emacs.devel Subject: Re: emacs client/server mode hardcodes /tmp path Date: Wed, 29 Oct 2008 10:28:10 +0100 Message-ID: <18696.11434.978893.578213@a1i15.kph.uni-mainz.de> References: <18695.5574.107271.711561@a1i15.kph.uni-mainz.de> <18696.5661.523071.167994@a1ihome1.kph.uni-mainz.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1225273691 2540 80.91.229.12 (29 Oct 2008 09:48:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 29 Oct 2008 09:48:11 +0000 (UTC) Cc: Diego Petteno , emacs-devel@gnu.org, Stefan Monnier , emacs@gentoo.org To: Juanma Barranquero Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Oct 29 10:49:12 2008 connect(): Connection refused Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Kv7fn-0000b3-3p for ged-emacs-devel@m.gmane.org; Wed, 29 Oct 2008 10:49:07 +0100 Original-Received: from localhost ([127.0.0.1]:38230 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kv7eg-0008G3-7n for ged-emacs-devel@m.gmane.org; Wed, 29 Oct 2008 05:47:58 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kv7Ln-0006Gv-Ry for emacs-devel@gnu.org; Wed, 29 Oct 2008 05:28:28 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Kv7Lj-0006Fj-1L for emacs-devel@gnu.org; Wed, 29 Oct 2008 05:28:24 -0400 Original-Received: from [199.232.76.173] (port=60578 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kv7Li-0006FP-E0 for emacs-devel@gnu.org; Wed, 29 Oct 2008 05:28:22 -0400 Original-Received: from a1iwww1.kph.uni-mainz.de ([134.93.134.1]:36434) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Kv7Lh-0007TQ-Ut for emacs-devel@gnu.org; Wed, 29 Oct 2008 05:28:22 -0400 Original-Received: from a1i15.kph.uni-mainz.de (a1i15.kph.uni-mainz.de [134.93.134.92]) by a1iwww1.kph.uni-mainz.de (8.14.0/8.13.4) with ESMTP id m9T9SBlN012927; Wed, 29 Oct 2008 10:28:11 +0100 Original-Received: from a1i15.kph.uni-mainz.de (localhost [127.0.0.1]) by a1i15.kph.uni-mainz.de (8.14.2/8.13.4) with ESMTP id m9T9SBBc006084; Wed, 29 Oct 2008 10:28:11 +0100 Original-Received: (from ulm@localhost) by a1i15.kph.uni-mainz.de (8.14.2/8.14.2/Submit) id m9T9SBc7006078; Wed, 29 Oct 2008 10:28:11 +0100 In-Reply-To: X-Mailer: VM 8.0.9 under Emacs 22.3.1 (i686-pc-linux-gnu) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 1) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:105138 Archived-At: >>>>> 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)