GNU bug report logs - #6781
emacs server with X11 build on OSX

Previous Next

Package: emacs;

Reported by: Juanma Barranquero <lekktu <at> gmail.com>

Date: Mon, 2 Aug 2010 20:23:02 UTC

Severity: normal

Done: Juanma Barranquero <lekktu <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #14 received at 6781 <at> debbugs.gnu.org (full text, mbox):

From: Juanma Barranquero <lekktu <at> gmail.com>
To: Ken Raeburn <raeburn <at> raeburn.org>
Cc: 6781 <at> debbugs.gnu.org, Leo <sdl.web <at> gmail.com>, emacs-devel <at> gnu.org
Subject: Re: emacs server with X11 build on OSX
Date: Tue, 3 Aug 2010 04:47:57 +0200
On Tue, Aug 3, 2010 at 04:12, Ken Raeburn <raeburn <at> raeburn.org> wrote:

> Using ":host 'local" causes the C code to look up the name "localhost",
> which may or may not map to IPv4 and/or IPv6 addresses.  (Almost
> always an IPv4 address of 127.0.0.1; sometimes IPv6 also, and I've
> occasionally seen it mapped to the local ethernet interface's IPv4
> address.)  Not specifying the host at all causes a wildcard address to
> be used, which would be reachable from other hosts, whereas
> 127.0.0.1 generally is not.

[Ah, the wonders of TCP.]

I think you're right, because in Leo's examples it works when he
specifically sets "127.0.0.1", so it's clear that Emacs isn't
selecting that address with "localhost" or 'local. I suppose the Right
Thing to do for server.el is to force it to use "127.0.0.1" instead of
'local for the :host argument.

    Juanma


=== modified file 'lisp/server.el'
--- lisp/server.el	2010-01-13 08:35:10 +0000
+++ lisp/server.el	2010-08-03 02:44:17 +0000
@@ -561,7 +561,7 @@
 		       ;; The other args depend on the kind of socket used.
 		       (if server-use-tcp
-			   (list :family nil
+			   (list :family 'ipv4
 				 :service t
-				 :host (or server-host 'local)
+				 :host (or server-host "127.0.0.1") ;; bug#6781
 				 :plist '(:authenticated nil))
 			 (list :family 'local




This bug report was last modified 14 years and 303 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.