From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Mike Kazantsev 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, 22 Jul 2018 19:54:58 +0500 Message-ID: <20180722195458.2e40086f@malediction> References: <20180619104351.41e4e3d1@malediction> <87efgnm17h.fsf@gmail.com> <831scgn3ig.fsf@gnu.org> <83in5ib53q.fsf@gnu.org> <83muum1d3m.fsf@gnu.org> <83effy14p6.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1532271256 2991 195.159.176.226 (22 Jul 2018 14:54:16 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 22 Jul 2018 14:54:16 +0000 (UTC) Cc: npostavs@gmail.com, 31901@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jul 22 16:54:11 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 1fhFkQ-0000fl-65 for geb-bug-gnu-emacs@m.gmane.org; Sun, 22 Jul 2018 16:54:10 +0200 Original-Received: from localhost ([::1]:56294 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fhFmW-00075L-TS for geb-bug-gnu-emacs@m.gmane.org; Sun, 22 Jul 2018 10:56:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55623) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fhFmH-00073M-UN for bug-gnu-emacs@gnu.org; Sun, 22 Jul 2018 10:56:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fhFmE-0008DV-Fi for bug-gnu-emacs@gnu.org; Sun, 22 Jul 2018 10:56:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:47518) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fhFmE-0008DL-AP for bug-gnu-emacs@gnu.org; Sun, 22 Jul 2018 10:56:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fhFmE-0001To-35 for bug-gnu-emacs@gnu.org; Sun, 22 Jul 2018 10:56:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Mike Kazantsev Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 22 Jul 2018 14:56: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.15322713165616 (code B ref 31901); Sun, 22 Jul 2018 14:56:02 +0000 Original-Received: (at 31901) by debbugs.gnu.org; 22 Jul 2018 14:55:16 +0000 Original-Received: from localhost ([127.0.0.1]:52533 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fhFlQ-0001SS-0M for submit@debbugs.gnu.org; Sun, 22 Jul 2018 10:55:15 -0400 Original-Received: from mail-lj1-f172.google.com ([209.85.208.172]:41695) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fhFlL-0001Ru-Tv for 31901@debbugs.gnu.org; Sun, 22 Jul 2018 10:55:11 -0400 Original-Received: by mail-lj1-f172.google.com with SMTP id y17-v6so14774480ljy.8 for <31901@debbugs.gnu.org>; Sun, 22 Jul 2018 07:55:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=7c7PGMDx6irUW2yfeUBozIXrMX9LAWDj6xFdoL53ixg=; b=ufZxo5o8V/hZeTkYfDIgCgjhF5rm3tPux/fYbrk/cIHS53bKkKBJuK22i2nKDIDutJ mk3885uoVanIPEKEeLS53y6YwVYuqksqcuXqsS/z+cTvQ4pa4t1CLq1vFK3sEMS3N7ju OStDKJ4SMw19XDfT5XT0zmxQt4oCqcYUw2lR7odgDbe9O//TL+R42RmVDmhwHbpdCSss ORoKYPzS03IufwlgRzYMThsXKk8w64P5KMZaVXr2cMyCMRIu/pRiWXMMADzMwpENCmx3 AkJl4ej8x/RZaZO761ZgbCLPNTB2LnVOhKRQhpDvXOYtNea/bfr4lzIBb0s3gctAb6bh xrvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=7c7PGMDx6irUW2yfeUBozIXrMX9LAWDj6xFdoL53ixg=; b=AdD8QfVX22zJ+PcPTsbzFQl17XWwcos1jaeRk/u4v7lSmIKkJImmiAaFv8QKHqMZ43 +uFb3cT5ACcLZpnjV4NzCl565N2o2cLfRaRjznMN5F58hyvGNs691cELYtuUYX2u7cpq io+u8YpykqI5X2aNuICAkFMiHb4NyCBtb3eg8NCuD9JkwGFyubrKVQVBUZYHZbQb46Jh 7+xFWAb1D+U/n7p1namrMcQnX0Y3M6NNSk0DsxQXQ0GA4nDwB0cXL8BZj4SwCu8g7HzC n+ovwx2+mJ1G1iBH8rN4YXsyDJear9xtj+8OEg0UqCqzPKTJkOosNgEPkyaayHhvBzJ0 kbqw== X-Gm-Message-State: AOUpUlGZW1yfIVnx8HOBllwL2Tc2dnl0LifGEMa/TKap5T7zbZGBzAL+ TmXTT/mCdJFxghr0ets5ByA= X-Google-Smtp-Source: AAOMgpcAF6nEtHkkvZRb63jsOICTbf3u5YNgD6/wY41wz5KMKwI4YQFqdMKFiuRiHrVPWXLkb3zMSg== X-Received: by 2002:a2e:1290:: with SMTP id 16-v6mr6836949ljs.94.1532271301116; Sun, 22 Jul 2018 07:55:01 -0700 (PDT) Original-Received: from malediction ([46.48.96.28]) by smtp.gmail.com with ESMTPSA id q16-v6sm1055734lfi.68.2018.07.22.07.54.59 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 22 Jul 2018 07:55:00 -0700 (PDT) In-Reply-To: X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) 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:148815 Archived-At: On Sun, 22 Jul 2018 13:40:51 +0200 Lars Ingebrigtsen wrote: > OK, I've now fixed the async error case (on master), I think: > > (process-live-p socket) > nil > (process-status socket) > file-missing > > I've fixed this on master, because I'm not 100% sure that my fix is > completely correct. Should we perhaps also call a sentinel in the async > error case? Unless I misunderstood the question, for me as a user, it would be more obvious to get this error in a sentinel call than not with emacs 26, because that's how :nowait is documented to work now: The recommended way to deal with asynchronous sockets is to avoid interacting with them until they have changed status to "run". This is most easily done from a process sentinel. https://github.com/emacs-mirror/emacs/blob/master/etc/NEWS.26 If bool is non-nil for a stream connection, return without waiting for the connection to complete. When the connection succeeds or fails, Emacs will call the sentinel function, with a second argument matching "open" (if successful) or "failed". https://www.gnu.org/software/emacs/manual/html_node/elisp/Network-Processes.html Given either of these guidelines, it'd be more surprising to not get error state in the sentinel call with ":nowait t" in emacs-26. (while ":nowait nil" signaling 'file-error is kinda expected) -- Mike Kazantsev // fraggod.net