From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#31901: Incorrect make-network-process + nowait state handling for non-existing unix sockets in emacs-26.1 Date: Fri, 06 Jul 2018 11:59:35 +0300 Message-ID: <831scgn3ig.fsf@gnu.org> References: <20180619104351.41e4e3d1@malediction> <87efgnm17h.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1530867493 14902 195.159.176.226 (6 Jul 2018 08:58:13 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 6 Jul 2018 08:58:13 +0000 (UTC) Cc: mk.fraggod@gmail.com, 31901@debbugs.gnu.org To: Noam Postavsky , larsi@gnus.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jul 06 10:58:09 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 1fbMZ5-0003i3-MA for geb-bug-gnu-emacs@m.gmane.org; Fri, 06 Jul 2018 10:58:07 +0200 Original-Received: from localhost ([::1]:56447 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fbMbC-0005N9-9l for geb-bug-gnu-emacs@m.gmane.org; Fri, 06 Jul 2018 05:00:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33897) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fbMb2-0005Ke-IH for bug-gnu-emacs@gnu.org; Fri, 06 Jul 2018 05:00:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fbMax-00013j-I2 for bug-gnu-emacs@gnu.org; Fri, 06 Jul 2018 05:00:08 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:40315) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fbMax-00011L-7m for bug-gnu-emacs@gnu.org; Fri, 06 Jul 2018 05:00:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fbMaw-0007f8-MH for bug-gnu-emacs@gnu.org; Fri, 06 Jul 2018 05:00:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 06 Jul 2018 09:00:02 +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: confirmed Original-Received: via spool by 31901-submit@debbugs.gnu.org id=B31901.153086758929406 (code B ref 31901); Fri, 06 Jul 2018 09:00:02 +0000 Original-Received: (at 31901) by debbugs.gnu.org; 6 Jul 2018 08:59:49 +0000 Original-Received: from localhost ([127.0.0.1]:48212 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fbMai-0007eD-Q6 for submit@debbugs.gnu.org; Fri, 06 Jul 2018 04:59:49 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:42652) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fbMae-0007du-Tc for 31901@debbugs.gnu.org; Fri, 06 Jul 2018 04:59:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fbMaU-0007Ug-Md for 31901@debbugs.gnu.org; Fri, 06 Jul 2018 04:59:39 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:44682) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fbMaU-0007UQ-JM; Fri, 06 Jul 2018 04:59:34 -0400 Original-Received: from [176.228.60.248] (port=2551 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1fbMaT-00022g-VQ; Fri, 06 Jul 2018 04:59:34 -0400 In-reply-to: <87efgnm17h.fsf@gmail.com> (message from Noam Postavsky on Sun, 01 Jul 2018 11:21:06 -0400) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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:148243 Archived-At: Ping! Lars, could you please look into this? > From: Noam Postavsky > Date: Sun, 01 Jul 2018 11:21:06 -0400 > Cc: Lars Ingebrigtsen , 31901@debbugs.gnu.org > > 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 > > > >