GNU bug report logs - #31901
Incorrect make-network-process + nowait state handling for non-existing unix sockets in emacs-26.1

Previous Next

Package: emacs;

Reported by: Mike Kazantsev <mk.fraggod <at> gmail.com>

Date: Tue, 19 Jun 2018 13:40:02 UTC

Severity: normal

Tags: confirmed, fixed

Fixed in version 26.2

Done: Noam Postavsky <npostavs <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


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

From: Noam Postavsky <npostavs <at> gmail.com>
To: Mike Kazantsev <mk.fraggod <at> gmail.com>
Cc: Lars Ingebrigtsen <larsi <at> gnus.org>, 31901 <at> debbugs.gnu.org
Subject: Re: bug#31901: Incorrect make-network-process + nowait state handling
 for non-existing unix sockets in emacs-26.1
Date: Sun, 01 Jul 2018 11:21:06 -0400
tags 31901 + confirmed
quit

Mike Kazantsev <mk.fraggod <at> gmail.com> writes:

> As far as I can tell, this is not documented behavior, definitely
> unexpected, breaks all old code that used unix sockets, and probably
> unintentional, i.e. a bug.

It seems to be due to this is_non_blocking_client check in
connect_network_socket:

  if (s < 0)
    {
      /* If non-blocking got this far - and failed - assume non-blocking is
         not supported after all.  This is probably a wrong assumption, but
         the normal blocking calls to open-network-stream handles this error
         better.  */
      if (p->is_non_blocking_client)
        return;

      report_file_errno ((p->is_server
                          ? "make server process failed"
                          : "make client process failed"),
                         contact, xerrno);
    }

In Emacs 25, this check was directly in Fmake_network_process before the
process object creation code, so we would just return nil in that case.
Seems to have changed, I assume accidentally, in [1: e09c0972c3].

[1: e09c0972c3]: 2016-01-28 23:50:47 +0100
  Refactor make_network_process
  https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=e09c0972c350e9411683b509414fc598cbf387d3




This bug report was last modified 6 years and 289 days ago.

Previous Next


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