GNU bug report logs - #6255
the notation of AF_LOCAL sockets in list-process

Previous Next

Package: emacs;

Reported by: Masatake YAMATO <yamato <at> redhat.com>

Date: Mon, 24 May 2010 06:46:02 UTC

Severity: normal

Tags: patch

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


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

From: Masatake YAMATO <yamato <at> redhat.com>
To: bug-gnu-emacs <at> gnu.org
Subject: the notation of AF_LOCAL sockets in list-process
Date: Mon, 24 May 2010 15:45:36 +0900 (JST)
This is a bug report with a patch. Please include the patch
if appreciated.

When `local' is given as :family keyword arugment of `make-network-process',
AF_LOCAL(also known as AF_UNIX) socket is created. This behavior is not changed
even if :host keyword arugment is given. This is O.K. But `list-process' doesn't 
work as we expected.

I'll explain the detail with example:

    (let ((port "/dev/log"))
      (make-network-process :name "syslog"
			    :host "127.0.0.1"
			    :noquery t
			    :service port
			    :family 'local
			    :type 'datagram))

Although "127.0.0.1" is specified at :host but `local' is
specified at :family, so `make-network-process' creates AF_LOCAL socket.
But M-x list-process tells

    Proc	  Status   Buffer Command
    ----	  ------   ------ -------
    syslog        open	   (none) (network datagram connection to 127.0.0.1)

This should be 


    Proc	  Status   Buffer Command
    ----	  ------   ------ -------
    syslog        open	   (none) (network datagram connection to /dev/log)


2010-05-23  Masatake YAMATO  <yamato <at> redhat.com>

	* process.c (Fmake_network_process): Reset `host'
	property if family is AF_LOCAL.

=== modified file 'src/process.c'
*** src/process.c	2010-05-04 04:00:10 +0000
--- src/process.c	2010-05-23 17:52:30 +0000
***************
*** 3352,3357 ****
--- 3352,3359 ----
      {
        /* Host is not used.  */
        host = Qnil;
+       contact = Fplist_put (contact, QChost, Qnil);
+       
        CHECK_STRING (service);
        bzero (&address_un, sizeof address_un);
        address_un.sun_family = AF_LOCAL;





This bug report was last modified 15 years and 50 days ago.

Previous Next


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