unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Juanma Barranquero <lekktu@gmail.com>
To: Ken Raeburn <raeburn@raeburn.org>
Cc: 6781@debbugs.gnu.org, Leo <sdl.web@gmail.com>, emacs-devel@gnu.org
Subject: bug#6781: emacs server with X11 build on OSX
Date: Tue, 3 Aug 2010 04:47:57 +0200	[thread overview]
Message-ID: <AANLkTi=7OkJNWML-KjuPJ8u1tE=iiUmAjtR_jMzGd-4y__5702.42577600784$1280804896$gmane$org@mail.gmail.com> (raw)
In-Reply-To: <83F33443-0C3F-4F9B-B584-D9301250B8FC@raeburn.org>

On Tue, Aug 3, 2010 at 04:12, Ken Raeburn <raeburn@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





  reply	other threads:[~2010-08-03  2:47 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <m1ocdmuoqf.fsf@cam.ac.uk>
     [not found] ` <AANLkTin+Nok-zrMg46+oQoFGVd3z2xxqRR8EN3ZiresL@mail.gmail.com>
     [not found]   ` <m162ztuhyf.fsf@cam.ac.uk>
2010-08-02 20:22     ` emacs server with X11 build on OSX Juanma Barranquero
2010-08-02 22:16       ` bug#6781: " Leo
2010-08-03  2:12       ` Ken Raeburn
2010-08-03  2:47         ` Juanma Barranquero [this message]
     [not found]         ` <AANLkTi=7OkJNWML-KjuPJ8u1tE=iiUmAjtR_jMzGd-4y@mail.gmail.com>
2010-08-03  5:01           ` bug#6781: " Leo
     [not found]           ` <m1eiegs30i.fsf@cam.ac.uk>
2010-08-03 12:02             ` Juanma Barranquero
     [not found]             ` <AANLkTikYDk_Cv-abMXLP3Zkpj9YKR77s4_56LLnZtBV1@mail.gmail.com>
2010-08-03 12:44               ` Andreas Schwab
     [not found]               ` <m3vd7rkgqk.fsf@hase.home>
2010-08-03 12:48                 ` Juanma Barranquero
     [not found]                 ` <AANLkTin1Cq3LfeXqKaz3v4ixi7=JkpwDGFUH92mJZQu4@mail.gmail.com>
2010-08-03 13:01                   ` Andreas Schwab
     [not found]                   ` <m3r5ifkfz8.fsf@hase.home>
2010-08-03 13:03                     ` Juanma Barranquero
     [not found]                     ` <AANLkTi=KTmMPqhueCm7ZViyDc3h1tV5nixqcNsWxpRUV@mail.gmail.com>
2010-08-04  0:52                       ` YAMAMOTO Mitsuharu
     [not found]                       ` <wl62zrb3nc.wl%mituharu@math.s.chiba-u.ac.jp>
2010-08-04 15:25                         ` Chong Yidong
     [not found]                         ` <87k4o6wgam.fsf@stupidchicken.com>
2010-09-25  3:57                           ` YAMAMOTO Mitsuharu
     [not found]                           ` <wlzkv68ogs.wl%mituharu@math.s.chiba-u.ac.jp>
2010-09-27 12:12                             ` Juanma Barranquero
2010-08-04 13:18           ` Stefan Monnier
2010-08-05  9:02             ` Juanma Barranquero
     [not found]             ` <AANLkTikdFvn_jUb96hnCYri_hHKttboL+sOW5etgiyFD@mail.gmail.com>
2010-08-09 11:24               ` Stefan Monnier
     [not found]               ` <jwveie881yq.fsf-monnier+emacs@gnu.org>
2010-08-09 17:08                 ` Juanma Barranquero
     [not found]                 ` <AANLkTikh7T=KV89H4z9XQL1+SmD4B8Fo2OT0Am4sATWC@mail.gmail.com>
2010-08-10 13:31                   ` Stefan Monnier
     [not found]                   ` <jwvr5i6ioiv.fsf-monnier+emacs@gnu.org>
2010-08-10 18:31                     ` Juanma Barranquero
2010-09-24 19:38                     ` Juanma Barranquero
     [not found]                     ` <AANLkTik8qDf9NOb7epns3QLNqqJ1BzcqhpP9fkqiWhzS@mail.gmail.com>
2010-09-24 22:27                       ` Stefan Monnier

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to='AANLkTi=7OkJNWML-KjuPJ8u1tE=iiUmAjtR_jMzGd-4y__5702.42577600784$1280804896$gmane$org@mail.gmail.com' \
    --to=lekktu@gmail.com \
    --cc=6781@debbugs.gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=raeburn@raeburn.org \
    --cc=sdl.web@gmail.com \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).