From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Noam Postavsky Newsgroups: gmane.emacs.bugs Subject: 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 Message-ID: <87efgnm17h.fsf@gmail.com> References: <20180619104351.41e4e3d1@malediction> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1530458411 26054 195.159.176.226 (1 Jul 2018 15:20:11 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 1 Jul 2018 15:20:11 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) Cc: Lars Ingebrigtsen , 31901@debbugs.gnu.org To: Mike Kazantsev Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jul 01 17:20:07 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fZe8z-0006cT-Gj for geb-bug-gnu-emacs@m.gmane.org; Sun, 01 Jul 2018 17:20:05 +0200 Original-Received: from localhost ([::1]:54697 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fZeB4-0004fF-Rr for geb-bug-gnu-emacs@m.gmane.org; Sun, 01 Jul 2018 11:22:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35487) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fZeAv-0004dx-PS for bug-gnu-emacs@gnu.org; Sun, 01 Jul 2018 11:22:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fZeAs-00074q-Iy for bug-gnu-emacs@gnu.org; Sun, 01 Jul 2018 11:22:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:34352) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fZeAs-00074b-EA for bug-gnu-emacs@gnu.org; Sun, 01 Jul 2018 11:22:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fZeAr-0002c0-V4 for bug-gnu-emacs@gnu.org; Sun, 01 Jul 2018 11:22:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Noam Postavsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 01 Jul 2018 15:22:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 31901 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 31901-submit@debbugs.gnu.org id=B31901.15304584769983 (code B ref 31901); Sun, 01 Jul 2018 15:22:01 +0000 Original-Received: (at 31901) by debbugs.gnu.org; 1 Jul 2018 15:21:16 +0000 Original-Received: from localhost ([127.0.0.1]:42249 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fZeA8-0002as-6G for submit@debbugs.gnu.org; Sun, 01 Jul 2018 11:21:16 -0400 Original-Received: from mail-it0-f42.google.com ([209.85.214.42]:51202) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fZeA6-0002aa-Ad; Sun, 01 Jul 2018 11:21:14 -0400 Original-Received: by mail-it0-f42.google.com with SMTP id o5-v6so7942045itc.1; Sun, 01 Jul 2018 08:21:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=hOwTVGXKwBiOzgq+xqvNxK7CDD/IYp8xGWTcMuA7nZk=; b=I0MHJF/yzi6+jazsixrnTtzoyBkwLjbwVYZDNDoBaGQHYfABtzrBzDd/JkZ6KhmeE9 nJ/d238RpgTEN3/r6b0D3b9K8gyygKhJEMAjjJxGQTtA6HStTDAqusfor+0kkZTWcSyV LoVvXCdX5cIzlMLOomeuZ8FO1ZxgRiaan36e9XvVYMwFy44lffx7Jc0rgcLalYIJhw6o nOP01MycYxn7OQ/sujtZ/S+SoFNF2/gxxBoB+Kf/qMIWgWGH/1m9XlcTj/syWXKdx5qa vts/dTlJIP3XzWx4JuYInI+TtPcsP96vtsufj6ebNt+ZjKYpqRZQK4i8n+hGfXKhDOGW Hflg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=hOwTVGXKwBiOzgq+xqvNxK7CDD/IYp8xGWTcMuA7nZk=; b=LirDhctKvo5QKG7b2K242x848Km7xEI4zUQamSEJJYR0xCk7kCyDpqUiHPDDD5FHEN bhSDvJ4LJPo7EfU+BjRaZIsXGKyUdj/96Pfbp0DHY4lyo8I+hL4HSo2kmoiAL0FOKQTI z48VFBHuyF2sB6HLT/ZM3OQ+VXpx0NZJni0OtItx4+VDqYzmRV6iuadv2Cs503goFCEM d3e+rH+ev4jnGYX/KukRFqfqvGPXX8NBkop1iNupujivkkyHyuDkCg1/D/lfT33d3xFI TdoR81JTlZY3yzY2JgMjXwYqythu7IHtAQW2vimgY8JOmkGtO/IcUJA70ldYB8WcarZ9 HDRg== X-Gm-Message-State: APt69E3Jd+1qrXIBKXaw5PnjfiB8DB+53M1IEfuLM22MserxBW9tXp2h JIq1Mz58DzgCvK61/dr7bpcsNA== X-Google-Smtp-Source: AAOMgpc7vKgmPJG2pb9iS2f0kCfs0mFtFG/x0b5NMAf9LdTY1WHQnlSKdub3r+wrRGANzohgpdGKAw== X-Received: by 2002:a24:eb0e:: with SMTP id h14-v6mr3895937itj.69.1530458468639; Sun, 01 Jul 2018 08:21:08 -0700 (PDT) Original-Received: from zebian (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34]) by smtp.googlemail.com with ESMTPSA id i15-v6sm6330637ioh.80.2018.07.01.08.21.07 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 01 Jul 2018 08:21:07 -0700 (PDT) In-Reply-To: <20180619104351.41e4e3d1@malediction> (Mike Kazantsev's message of "Tue, 19 Jun 2018 10:43:51 +0500") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:148048 Archived-At: tags 31901 + confirmed quit Mike Kazantsev 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