X-Loop: help-debbugs@HIDDEN
Subject: bug#64975: 30.0.50; accept-process-output and async connect
Resent-From: Helmut Eller <eller.helmut@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Mon, 31 Jul 2023 13:32:01 +0000
Resent-Message-ID: <handler.64975.B.169081028021368 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 64975
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords:
To: 64975 <at> debbugs.gnu.org
X-Debbugs-Original-To: bug-gnu-emacs@HIDDEN
Received: via spool by submit <at> debbugs.gnu.org id=B.169081028021368
(code B ref -1); Mon, 31 Jul 2023 13:32:01 +0000
Received: (at submit) by debbugs.gnu.org; 31 Jul 2023 13:31:20 +0000
Received: from localhost ([127.0.0.1]:52025 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1qQSzY-0005Ya-5J
for submit <at> debbugs.gnu.org; Mon, 31 Jul 2023 09:31:20 -0400
Received: from lists.gnu.org ([2001:470:142::17]:56268)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <eller.helmut@HIDDEN>) id 1qQSzW-0005YN-FW
for submit <at> debbugs.gnu.org; Mon, 31 Jul 2023 09:31:18 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10])
by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.90_1) (envelope-from <eller.helmut@HIDDEN>)
id 1qQSzQ-0003m5-LJ
for bug-gnu-emacs@HIDDEN; Mon, 31 Jul 2023 09:31:12 -0400
Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331])
by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
(Exim 4.90_1) (envelope-from <eller.helmut@HIDDEN>)
id 1qQSzM-000667-Vm
for bug-gnu-emacs@HIDDEN; Mon, 31 Jul 2023 09:31:11 -0400
Received: by mail-wm1-x331.google.com with SMTP id
5b1f17b1804b1-3fbc244d384so41834765e9.0
for <bug-gnu-emacs@HIDDEN>; Mon, 31 Jul 2023 06:31:08 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20221208; t=1690810267; x=1691415067;
h=mime-version:message-id:date:subject:to:from:from:to:cc:subject
:date:message-id:reply-to;
bh=BfGL74sQAgyaCny7wW+KAOHimI80JKr7MmM8JEPcu3k=;
b=ZfiIKkj+yQJF7vjFoDlbQTVmivXuqQ0I0fTZ2GJiPcFJhlxWagi9yM9O3zm30NAXTS
SxlsMTBjOEsojxHsD6JPASnbIpBBA8GXaPqmmuMMVrFmEZ2vc7bjSjAWxajJTtkvsMOP
13N7AiGfXufYLNuWYlz6cG4ypvwX26WRJiLlC8SdiaNKe8THgkBg5vgouf28PoYf9lpa
gsHVXD0pn4jRBeU6HeZjdHxdfO7my6uki2I0ZpwzjyOqk/VwjwrIQnsV7/KjIUAPFwA0
bjQcig0xSHjqYOJxkmCC0p0Kum0JJ7TfrMLwIjfSvtSce2YCuLpUhhydaly/rK/FpOYA
UdXQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20221208; t=1690810267; x=1691415067;
h=mime-version:message-id:date:subject:to:from:x-gm-message-state
:from:to:cc:subject:date:message-id:reply-to;
bh=BfGL74sQAgyaCny7wW+KAOHimI80JKr7MmM8JEPcu3k=;
b=IgK0pT5ZvTgLsJiTj4Ojik7lBhbTKtlfUShJg+1Ou1xrlgxKSrCNkdY0OseUgP3zhJ
beRSHO5PpiVI+UJLY+34fKJv4B4Zhu5ximXLT0UtDd3sls1D1gZ0Ca8e+ybS8nkEA5Xw
IHRG/rA/Xf2OUY9Nr/9wpIOOxfumSmYwsuSUd8zcFgXw2NXY9uuGprTSkijX4vVUL+9P
qxYBTiCypjZDPPHvNRyJG0C0jwJ9QsyMJaBQoU6cl6rqIBkfYzd75a+QIG4FIxNuE7b5
J6IAQrxgrKG7sxGiFVrZYLVx5GszUV/QmFnUH7fjw/OdFB6EurMgQlCmDnXHNIWLL6Ad
r54Q==
X-Gm-Message-State: ABy/qLZuhbu7VxBvtfzLKACEYfvf8Y3kCbAQrmaErDCm7/Se8rhmARyM
0ohd5dwhHAmftfgKP0eQVLAyS18hD24=
X-Google-Smtp-Source: APBJJlGHltfUIccM16DiXgVMCqYmvREHgcf/eCRnPhoN89u9wVKXzrNboP6rpjihlfTSk2D3nszVyA==
X-Received: by 2002:a05:600c:2109:b0:3fa:97ad:2ba5 with SMTP id
u9-20020a05600c210900b003fa97ad2ba5mr4471868wml.31.1690810266737;
Mon, 31 Jul 2023 06:31:06 -0700 (PDT)
Received: from caladan (dialin-228086.xdsl.raiffeisen.net. [195.254.228.86])
by smtp.gmail.com with ESMTPSA id
ay12-20020a05600c1e0c00b003fe1afb99b5sm5178253wmb.0.2023.07.31.06.31.05
for <bug-gnu-emacs@HIDDEN>
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Mon, 31 Jul 2023 06:31:06 -0700 (PDT)
From: Helmut Eller <eller.helmut@HIDDEN>
Date: Mon, 31 Jul 2023 15:31:00 +0200
Message-ID: <m2wmygdx7v.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
Received-SPF: pass client-ip=2a00:1450:4864:20::331;
envelope-from=eller.helmut@HIDDEN; helo=mail-wm1-x331.google.com
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001,
RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001,
T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 1.0 (+)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)
--=-=-=
Content-Type: text/plain
This example fails:
--=-=-=
Content-Type: text/plain
Content-Disposition: inline; filename=async-connect.el
(ert-deftest async-connect ()
(let* ((host 'local)
(family 'ipv4)
(port 57869)
(server (make-network-process
:name "server" :server t :noquery t :reuseaddr t
:host host :service port :family family))
(proc (make-network-process
:name "async-connect" :nowait t
:host host :service port :family family)))
(should (eq (process-status proc) 'connect))
(should (accept-process-output proc 2))
(should (eq (process-status proc) 'open))))
--=-=-=
Content-Type: text/plain
when executed with
emacs --batch -Q -l async-connect.el -f ert-run-tests-batch-and-exit
It seems that accept-process-output correctly updates the process-status
but it forgets to break out of the loop.
With the following change, the test passes:
--=-=-=
Content-Type: text/x-diff
Content-Disposition: inline; filename=async-wait.patch
diff --git a/src/process.c b/src/process.c
index 2d6e08f16b5..159d39aeabc 100644
--- a/src/process.c
+++ b/src/process.c
@@ -6024,6 +6024,7 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd,
#endif
{
pset_status (p, Qrun);
+ got_some_output = 1;
/* Execute the sentinel here. If we had relied on
status_notify to do it later, it will read input
from the process before calling the sentinel. */
--=-=-=
Content-Type: text/plain
In GNU Emacs 30.0.50 (build 73, x86_64-pc-linux-gnu, GTK+ Version
3.24.37, cairo version 1.16.0) of 2023-07-31 built on caladan
Repository revision: 1f3995f65a065a28e108653128b31a2fb7eeb01c
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12101007
System Description: Debian GNU/Linux 12 (bookworm)
Configured using:
'configure --with-xpm=ifavailable --with-jpeg=ifavailable
--with-gif=ifavailable --with-tiff=ifavailable'
Configured features:
CAIRO DBUS FREETYPE GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG LIBSELINUX
LIBSYSTEMD LIBXML2 MODULES NOTIFY INOTIFY PDUMPER PNG SECCOMP SOUND
SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS WEBP X11 XDBE XIM XINPUT2 GTK3
ZLIB
Important settings:
value of $LANG: C.UTF-8
locale-coding-system: utf-8-unix
--=-=-=--
Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) Content-Type: text/plain; charset=utf-8 X-Loop: help-debbugs@HIDDEN From: help-debbugs@HIDDEN (GNU bug Tracking System) To: Helmut Eller <eller.helmut@HIDDEN> Subject: bug#64975: Acknowledgement (30.0.50; accept-process-output and async connect) Message-ID: <handler.64975.B.169081028021368.ack <at> debbugs.gnu.org> References: <m2wmygdx7v.fsf@HIDDEN> X-Gnu-PR-Message: ack 64975 X-Gnu-PR-Package: emacs Reply-To: 64975 <at> debbugs.gnu.org Date: Mon, 31 Jul 2023 13:32:01 +0000 Thank you for filing a new bug report with debbugs.gnu.org. This is an automatically generated reply to let you know your message has been received. Your message is being forwarded to the package maintainers and other interested parties for their attention; they will reply in due course. Your message has been sent to the package maintainer(s): bug-gnu-emacs@HIDDEN If you wish to submit further information on this problem, please send it to 64975 <at> debbugs.gnu.org. Please do not send mail to help-debbugs@HIDDEN unless you wish to report a problem with the Bug-tracking system. --=20 64975: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D64975 GNU Bug Tracking System Contact help-debbugs@HIDDEN with problems
X-Loop: help-debbugs@HIDDEN
Subject: bug#64975: 30.0.50; accept-process-output and async connect
Resent-From: Eli Zaretskii <eliz@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sat, 05 Aug 2023 09:27:02 +0000
Resent-Message-ID: <handler.64975.B64975.169122756632614 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 64975
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords:
To: Helmut Eller <eller.helmut@HIDDEN>, Robert Pluim <rpluim@HIDDEN>
Cc: 64975 <at> debbugs.gnu.org
Received: via spool by 64975-submit <at> debbugs.gnu.org id=B64975.169122756632614
(code B ref 64975); Sat, 05 Aug 2023 09:27:02 +0000
Received: (at 64975) by debbugs.gnu.org; 5 Aug 2023 09:26:06 +0000
Received: from localhost ([127.0.0.1]:55649 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1qSDXx-0008Tv-T3
for submit <at> debbugs.gnu.org; Sat, 05 Aug 2023 05:26:06 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:33168)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <eliz@HIDDEN>) id 1qSDXw-0008Su-M0
for 64975 <at> debbugs.gnu.org; Sat, 05 Aug 2023 05:26:04 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
id 1qSDXr-0005IW-E9; Sat, 05 Aug 2023 05:25:59 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
mime-version; bh=/Og/1OWWdmN9/0drpaO61BXwiPOzd9NW05+hruCcyno=; b=bUIjzKg6jpzm
XFaMWpZb18ex6ZeTlPPSumqlsg9OKi2PywLI74+CHEtEsGLJLmt7HZ5mrGTgDBZgMgErmsDzQ+HJ6
Pem9jKlok74x/9EEB+Sq5eKaeqqZMP7Z075YmT1DFnCKevmlUQfY3ldws+DlDBfaDnCZdyJfuR6QG
7ISSNO5v/f1WGukhGkG0CxeDqNFn6GG6MnwuEVJ/5ZlDFBkeUUpV4e/0M2OcDkE0XSCOpqG/zt9Jk
VvoRJX0WSK8FoFsFe00rVuVl5VBFW0RVCmZxGKuXamsJ1CrfG6yZhQ7oEiEIF7rb/IZLh0UuAl2+s
9mH4diI6VQv54WLVNlw50w==;
Received: from [87.69.77.57] (helo=home-c4e4a596f7)
by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
id 1qSDXq-0007a9-Tj; Sat, 05 Aug 2023 05:25:59 -0400
Date: Sat, 05 Aug 2023 12:26:13 +0300
Message-Id: <838rapu9fu.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
In-Reply-To: <m2wmygdx7v.fsf@HIDDEN> (message from Helmut Eller on Mon, 31
Jul 2023 15:31:00 +0200)
References: <m2wmygdx7v.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)
> From: Helmut Eller <eller.helmut@HIDDEN>
> Date: Mon, 31 Jul 2023 15:31:00 +0200
>
> (ert-deftest async-connect ()
> (let* ((host 'local)
> (family 'ipv4)
> (port 57869)
> (server (make-network-process
> :name "server" :server t :noquery t :reuseaddr t
> :host host :service port :family family))
> (proc (make-network-process
> :name "async-connect" :nowait t
> :host host :service port :family family)))
> (should (eq (process-status proc) 'connect))
> (should (accept-process-output proc 2))
> (should (eq (process-status proc) 'open))))
>
> when executed with
> emacs --batch -Q -l async-connect.el -f ert-run-tests-batch-and-exit
>
> It seems that accept-process-output correctly updates the process-status
> but it forgets to break out of the loop.
>
> With the following change, the test passes:
Robert, any comments?
X-Loop: help-debbugs@HIDDEN
Subject: bug#64975: 30.0.50; accept-process-output and async connect
Resent-From: Robert Pluim <rpluim@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Tue, 08 Aug 2023 09:11:02 +0000
Resent-Message-ID: <handler.64975.B64975.169148582817443 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 64975
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords:
To: Eli Zaretskii <eliz@HIDDEN>
Cc: 64975 <at> debbugs.gnu.org, Helmut Eller <eller.helmut@HIDDEN>
Received: via spool by 64975-submit <at> debbugs.gnu.org id=B64975.169148582817443
(code B ref 64975); Tue, 08 Aug 2023 09:11:02 +0000
Received: (at 64975) by debbugs.gnu.org; 8 Aug 2023 09:10:28 +0000
Received: from localhost ([127.0.0.1]:35149 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1qTIjU-0004XG-61
for submit <at> debbugs.gnu.org; Tue, 08 Aug 2023 05:10:28 -0400
Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]:44324)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <rpluim@HIDDEN>) id 1qTIjR-0004X3-So
for 64975 <at> debbugs.gnu.org; Tue, 08 Aug 2023 05:10:27 -0400
Received: by mail-wm1-x331.google.com with SMTP id
5b1f17b1804b1-3fe2048c910so45655265e9.1
for <64975 <at> debbugs.gnu.org>; Tue, 08 Aug 2023 02:10:25 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20221208; t=1691485820; x=1692090620;
h=content-transfer-encoding:mime-version:message-id:date:references
:in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id
:reply-to; bh=VRXOvAYmtIeVwWGWzo5H3rB/pFt+b+HprJjmjGpNow4=;
b=DHEc3EKCzvtAFrS0oYQdJbNUvPivVfkeXPfD2ZbeAacbwT/dCm0QX9YmwvbpYR3kjy
AgKWcttuiiAq9O6G/AGiSFoTB+ixqB5EwapyvjTJkPieLCFWWCiPQ4cmrtuNv9Rw0IpM
QTT/NmHQMiD22jgBfcRJbI6WjZKGuWB2tOhWOlIWmqjChEXreoh06uDancCMlpakPqsb
qQ4o+yMRSS/bR9+HeCqfKGMuu3s2wNL90OQ+t2wYeIj8ABJxDRXQgtHxYhXzMbB+Q9J0
NnSVK6VKPZmleYzoIloBD2OoSzWkzvFi+eDqHhE+oWN2IbpTpm9Zsb6g6ouglVpDFXPn
mU7w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20221208; t=1691485820; x=1692090620;
h=content-transfer-encoding:mime-version:message-id:date:references
:in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=VRXOvAYmtIeVwWGWzo5H3rB/pFt+b+HprJjmjGpNow4=;
b=BqY/36U7v8c92jQ414aLij7oqFf9oQLvapVOUtOimJpCrOULYBABI3YVGDoXJF1PUx
nWGXaA9dRWAVEd6fReAxM2jlMu/NbE31LKBuO/ekuHuoyMG5Ez6uBXOHHoyfAfGVIvgs
oIUdqsf3qvSIPNQfktId1e//uWyugnlhdn5uFelmYhd0yvyCPnmllC/7ubFu//FXW7/A
vBnxi/NtBmcMguVmihga4ZiEo+dRHMFJUw1594cvsI26ffKT/rF9fUlBZl+ZG96AxGI/
kCiM2oP+mcHmvIgfkvO1EdnH1HpriegexHy972U6sgO3+6h8kQVGxq5c2SSXkt0G22/P
UUDw==
X-Gm-Message-State: AOJu0YztE4UCqyb4x4kcA+pFrtn/SnLElOlAajIAbEgJGftWp77KsS9T
b/1zRc6u6FRnDWJ41oERoigLbSDcXTs=
X-Google-Smtp-Source: AGHT+IFQ9Wx2ArALzjgklJDIENdsPnS8/N7OENXfNEVOSCMGSdl/NSgKCiP39bGK3Jg9++BpI0dUQQ==
X-Received: by 2002:a05:6000:c5:b0:314:172b:a7d5 with SMTP id
q5-20020a05600000c500b00314172ba7d5mr7971490wrx.27.1691485819599;
Tue, 08 Aug 2023 02:10:19 -0700 (PDT)
Received: from rltb ([2a01:e0a:3f3:fb50:602c:69f4:ec01:92cc])
by smtp.gmail.com with ESMTPSA id
c3-20020a5d5283000000b003179d7ed4f3sm13092150wrv.12.2023.08.08.02.10.18
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Tue, 08 Aug 2023 02:10:18 -0700 (PDT)
From: Robert Pluim <rpluim@HIDDEN>
In-Reply-To: <838rapu9fu.fsf@HIDDEN> (Eli Zaretskii's message of "Sat, 05 Aug
2023 12:26:13 +0300")
References: <m2wmygdx7v.fsf@HIDDEN> <838rapu9fu.fsf@HIDDEN>
Date: Tue, 08 Aug 2023 11:10:18 +0200
Message-ID: <87o7jhaohx.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)
>>>>> On Sat, 05 Aug 2023 12:26:13 +0300, Eli Zaretskii <eliz@HIDDEN> said:
>> From: Helmut Eller <eller.helmut@HIDDEN>
>> Date: Mon, 31 Jul 2023 15:31:00 +0200
>>=20
>> (ert-deftest async-connect ()
>> (let* ((host 'local)
>> (family 'ipv4)
>> (port 57869)
>> (server (make-network-process
>> :name "server" :server t :noquery t :reuseaddr t
>> :host host :service port :family family))
>> (proc (make-network-process
>> :name "async-connect" :nowait t
>> :host host :service port :family family)))
>> (should (eq (process-status proc) 'connect))
>> (should (accept-process-output proc 2))
>> (should (eq (process-status proc) 'open))))
>>=20
>> when executed with
>> emacs --batch -Q -l async-connect.el -f ert-run-tests-batch-and-exit
>>=20
>> It seems that accept-process-output correctly updates the process-st=
atus
>> but it forgets to break out of the loop.
>>=20
>> With the following change, the test passes:
Eli> Robert, any comments?
I go away for a week, and this is what you give me as a coming-back
present? :-)
I think it=CA=BCs correct, as I have a change locally setting
got_some_output for a different test case, but I=CA=BCm going to be a pain,
and ask Helmut to explain why, and see if I agree with his explanation
(that=CA=BCs a very hairy loop)
Robert
--=20
X-Loop: help-debbugs@HIDDEN
Subject: bug#64975: 30.0.50; accept-process-output and async connect
Resent-From: Eli Zaretskii <eliz@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Tue, 08 Aug 2023 12:16:01 +0000
Resent-Message-ID: <handler.64975.B64975.169149692515249 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 64975
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords:
To: Robert Pluim <rpluim@HIDDEN>
Cc: 64975 <at> debbugs.gnu.org, eller.helmut@HIDDEN
Received: via spool by 64975-submit <at> debbugs.gnu.org id=B64975.169149692515249
(code B ref 64975); Tue, 08 Aug 2023 12:16:01 +0000
Received: (at 64975) by debbugs.gnu.org; 8 Aug 2023 12:15:25 +0000
Received: from localhost ([127.0.0.1]:35399 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1qTLcT-0003xs-9t
for submit <at> debbugs.gnu.org; Tue, 08 Aug 2023 08:15:25 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:38446)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <eliz@HIDDEN>) id 1qTLcQ-0003xb-Vs
for 64975 <at> debbugs.gnu.org; Tue, 08 Aug 2023 08:15:23 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
id 1qTLcL-00060V-KD; Tue, 08 Aug 2023 08:15:17 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From:
Date; bh=NmDoyDo1M+bCucUzVJaDM5eksuC7O0uIuxOS4RHKCY0=; b=m/7VzuUualTwIowOQPXM
8G1Pe4PaExqHTQ7tsEgTfaX5kGavfc7EStAEDct97VW3zXWP1K6VT6VeIDmgH+dOZ9kNV8N+gtvgJ
cbR53kZrjUlPW9NQeHT8A8+id2ZVSvYMbPLfyDpESl1KltjgIsm7ybPaKJ9PRz2hZvTNbw7uFA2iS
y5Yn+E6Jb+kzZp5mmpGzzlDAxay6ayWv5bfsPU2yawKVXONE1d1ifCLkAxgvw0gnJfGpG/v9A8+Pb
nZsRDzkTRrCvhbMnogq2opdu5D08fe/yzgI6vJxajPCbmFTvwXkLRDZ65kCey313JNVDYWTCKUUb6
xah2PUuV22wyPw==;
Date: Tue, 08 Aug 2023 15:15:37 +0300
Message-Id: <834jl9ohli.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
In-Reply-To: <87o7jhaohx.fsf@HIDDEN> (message from Robert Pluim on Tue, 08
Aug 2023 11:10:18 +0200)
References: <m2wmygdx7v.fsf@HIDDEN> <838rapu9fu.fsf@HIDDEN>
<87o7jhaohx.fsf@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)
> From: Robert Pluim <rpluim@HIDDEN>
> Cc: Helmut Eller <eller.helmut@HIDDEN>, 64975 <at> debbugs.gnu.org
> Date: Tue, 08 Aug 2023 11:10:18 +0200
>
> >>>>> On Sat, 05 Aug 2023 12:26:13 +0300, Eli Zaretskii <eliz@HIDDEN> said:
>
> Eli> Robert, any comments?
>
> I go away for a week, and this is what you give me as a coming-back
> present? :-)
;-)
> I think itʼs correct, as I have a change locally setting
> got_some_output for a different test case, but Iʼm going to be a pain,
> and ask Helmut to explain why, and see if I agree with his explanation
> (thatʼs a very hairy loop)
I would like to know that as well, and I thought you already knew.
X-Loop: help-debbugs@HIDDEN
Subject: bug#64975: 30.0.50; accept-process-output and async connect
Resent-From: Robert Pluim <rpluim@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Tue, 08 Aug 2023 12:33:01 +0000
Resent-Message-ID: <handler.64975.B64975.169149797827451 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 64975
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords:
To: Eli Zaretskii <eliz@HIDDEN>
Cc: 64975 <at> debbugs.gnu.org, eller.helmut@HIDDEN
Received: via spool by 64975-submit <at> debbugs.gnu.org id=B64975.169149797827451
(code B ref 64975); Tue, 08 Aug 2023 12:33:01 +0000
Received: (at 64975) by debbugs.gnu.org; 8 Aug 2023 12:32:58 +0000
Received: from localhost ([127.0.0.1]:35454 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1qTLtS-00078g-5B
for submit <at> debbugs.gnu.org; Tue, 08 Aug 2023 08:32:58 -0400
Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]:47461)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <rpluim@HIDDEN>) id 1qTLtQ-00078E-8s
for 64975 <at> debbugs.gnu.org; Tue, 08 Aug 2023 08:32:56 -0400
Received: by mail-wm1-x32d.google.com with SMTP id
5b1f17b1804b1-3fe5c0e58c0so19278115e9.3
for <64975 <at> debbugs.gnu.org>; Tue, 08 Aug 2023 05:32:56 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20221208; t=1691497970; x=1692102770;
h=content-transfer-encoding:mime-version:message-id:date:references
:in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id
:reply-to; bh=fOg1tIceQ1v5q3NsenV4QgyEfHgE6CkevlKRngCcyZE=;
b=BnJiXMSUSQRFV79VeMy05yyLQ0Icg4RFVMW3TQiyjItcy9iI8AmYKQeOOPjx+kyg1c
2a6dwLJH7GEmsUm2kHJ202cLGkTZfyF9ktFhOAukm2GbqNxnJGnDEF3Kd3mlHP7tFeTt
VI7XwFTrc+Kc6IUZUdXzuXN6Jys4mze9KYviAOfD1sLuXdojkrg5Bi0z7vXFk3LA5c1I
4clCbkt3DnD8xdwcRf6GbsN87zYGtcMyS6Jkao3Cgt2T3rIicQiz+29veDOmibOpGESq
JImr9Zf/PKkvGKiu1Kuw2Kf0VNKapjKn8Xre6WgsAxbnV8Kq74S+s8lFU/Aq1e/h55TH
KMSw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20221208; t=1691497970; x=1692102770;
h=content-transfer-encoding:mime-version:message-id:date:references
:in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=fOg1tIceQ1v5q3NsenV4QgyEfHgE6CkevlKRngCcyZE=;
b=DLe5Q34SySdH/RIZp8KVVMLBZa9PRPdTHIfirkQ2a1cnJCiQsWzIixonufBpBmZ4h3
zm7323roqpsGu41kQr3xYoFAVHhoWYF0PaHGPWQCASLk2Tx5ZJQsXkRPiqtjrnNInLc1
gbvZbSJKa5MlTKDowVeiU0RoRGI9OVyLYVp61q79DASlC80dlDKP/VIDg+r/1IpldYns
DJKhlyVnIJQ3lGH8nXlFhEFqaYZQWKEhmAD9K4OEDwFW6GreTLdH9NdJBvLAXmNK8aNC
xUksNLozMhuYRz2OM4Fyb0BjcNnq608FxK70F35OF3PHS0A4i3QOpVb1Mtpbii8CPqia
SUCQ==
X-Gm-Message-State: AOJu0YwnAeALu7qhgB3TSp4ma4ypm+Z5s+c9XlITjexBNdYfauQWHAk8
Z78bKeLjK/7SdsGzHxB/+aSnBdDFfKk=
X-Google-Smtp-Source: AGHT+IECLi6pVxvjN+cjQ1lFRBzwZEP2Szt+6zSKksfW5jUhpCzVhJtsRxIh7V9ZWtgoGvA1mnOCGg==
X-Received: by 2002:a05:600c:2611:b0:3fb:fef3:53f8 with SMTP id
h17-20020a05600c261100b003fbfef353f8mr9254291wma.25.1691497969885;
Tue, 08 Aug 2023 05:32:49 -0700 (PDT)
Received: from rltb ([2a01:e0a:3f3:fb50:602c:69f4:ec01:92cc])
by smtp.gmail.com with ESMTPSA id
h20-20020a05600c261400b003fe2ebf479fsm13621934wma.36.2023.08.08.05.32.49
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Tue, 08 Aug 2023 05:32:49 -0700 (PDT)
From: Robert Pluim <rpluim@HIDDEN>
In-Reply-To: <834jl9ohli.fsf@HIDDEN> (Eli Zaretskii's message of "Tue, 08 Aug
2023 15:15:37 +0300")
References: <m2wmygdx7v.fsf@HIDDEN> <838rapu9fu.fsf@HIDDEN>
<87o7jhaohx.fsf@HIDDEN> <834jl9ohli.fsf@HIDDEN>
Date: Tue, 08 Aug 2023 14:32:48 +0200
Message-ID: <87fs4taf4f.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)
>>>>> On Tue, 08 Aug 2023 15:15:37 +0300, Eli Zaretskii <eliz@HIDDEN> said:
>> I think it=CA=BCs correct, as I have a change locally setting
>> got_some_output for a different test case, but I=CA=BCm going to be =
a pain,
>> and ask Helmut to explain why, and see if I agree with his explanati=
on
>> (that=CA=BCs a very hairy loop)
Eli> I would like to know that as well, and I thought you already knew.
It=CA=BCs code I last looked at in detail 2 months ago, so the workings are
not completely in memory, and I=CA=BCve got things to do, so I=CA=BCm takin=
g the
lazy option.
Robert
--=20
X-Loop: help-debbugs@HIDDEN
Subject: bug#64975: 30.0.50; accept-process-output and async connect
Resent-From: Helmut Eller <eller.helmut@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Tue, 08 Aug 2023 14:37:02 +0000
Resent-Message-ID: <handler.64975.B64975.169150537020109 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 64975
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords:
To: Robert Pluim <rpluim@HIDDEN>
Cc: 64975 <at> debbugs.gnu.org, Eli Zaretskii <eliz@HIDDEN>
Received: via spool by 64975-submit <at> debbugs.gnu.org id=B64975.169150537020109
(code B ref 64975); Tue, 08 Aug 2023 14:37:02 +0000
Received: (at 64975) by debbugs.gnu.org; 8 Aug 2023 14:36:10 +0000
Received: from localhost ([127.0.0.1]:37436 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1qTNog-0005EG-1t
for submit <at> debbugs.gnu.org; Tue, 08 Aug 2023 10:36:10 -0400
Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]:58759)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <eller.helmut@HIDDEN>) id 1qTNoe-0005E3-6K
for 64975 <at> debbugs.gnu.org; Tue, 08 Aug 2023 10:36:08 -0400
Received: by mail-wr1-x432.google.com with SMTP id
ffacd0b85a97d-317798b359aso4387572f8f.1
for <64975 <at> debbugs.gnu.org>; Tue, 08 Aug 2023 07:36:08 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20221208; t=1691505362; x=1692110162;
h=content-transfer-encoding:mime-version:user-agent:message-id:date
:references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date
:message-id:reply-to;
bh=JDT93vjIw8GRfFVh9uBmJvkiIar+Xo/rnyAefBKsSDU=;
b=JKgDQCAR9SX9GlSMuVDiQyInJTJ0rt+3WRxWucVB0Ah/4C4lueUfWinoOnZIQSW/U0
m4m5leHWBjBKG4ku7lCIwqscD/2KapuH+iRJ09X4a1VU6bjRMrf05AZi8xev90iz0RtE
8uyKvQ/cmHFgcatuIX29GkJn5+MZyhd7GZ3SsT5GDdS9Xmx2gwfsqNNDDQUhqF7SYBWx
OhhGhWr5Y1sksWe8+y4UtPI2SXtjs9HtRDXM0gk9f09PxLpnwOb5zA7oAi+a2BOgHMLB
FskB5nrOvabyKpBI8M8uOMFc0PmnVMpfkHa8rBlu1wdVpWyBDjv78bYzSMK56ebLzP8B
6x0g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20221208; t=1691505362; x=1692110162;
h=content-transfer-encoding:mime-version:user-agent:message-id:date
:references:in-reply-to:subject:cc:to:from:x-gm-message-state:from
:to:cc:subject:date:message-id:reply-to;
bh=JDT93vjIw8GRfFVh9uBmJvkiIar+Xo/rnyAefBKsSDU=;
b=YTnSUZxKR2adpTZCeJb1kYH2fsc752/83j4cX46Dkl56zoAMV/LuDHPQNWgyHXFFSu
3wy6aFOYm+LNt6IP2eEP7Hg0W+7BnLtu8SkefHfqfaG5fhYH4BTSN66NlY0SRr5Qc2+y
YK2Tq5NQBj32Lkr8yZOvoL7XZnLRFISIf0/Vy1M7WK0asHAB5menMp1kpaHrpeQEI/No
SawZgmNKFBxJO6KMmUFOFYu4qLKn7H443kcVUtK/7vi5lc4ve78xrDJY5ihKDJg9/gzl
BWp5axUd8r21zYglAPT8xiAKL2Xxry6QfgJzv2WsIyPlcdfOeP3VPnUeg8REMcEGKM+4
epyg==
X-Gm-Message-State: AOJu0YzW1DW6FL+6C/7+LwZ6n9cXBNwBDzOelKrll7owE1PZSg5daDjS
yfR855WYn4YOTBxZfGDtvwm7U/iVIQA=
X-Google-Smtp-Source: AGHT+IF/5zMDJNBdLdmPNGaYDl2q8xTeHnJYdL+9Vfaa/Rwm8UcF+96mwMVvNR1/NFC4HTc5KguJbw==
X-Received: by 2002:a5d:4f04:0:b0:315:901b:e795 with SMTP id
c4-20020a5d4f04000000b00315901be795mr7876415wru.13.1691505362095;
Tue, 08 Aug 2023 07:36:02 -0700 (PDT)
Received: from caladan (dialin-228086.xdsl.raiffeisen.net. [195.254.228.86])
by smtp.gmail.com with ESMTPSA id
u16-20020adfdb90000000b003175a994555sm14160325wri.6.2023.08.08.07.36.01
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Tue, 08 Aug 2023 07:36:01 -0700 (PDT)
From: Helmut Eller <eller.helmut@HIDDEN>
In-Reply-To: <87o7jhaohx.fsf@HIDDEN> (Robert Pluim's message of "Tue, 08
Aug 2023 11:10:18 +0200")
References: <m2wmygdx7v.fsf@HIDDEN> <838rapu9fu.fsf@HIDDEN>
<87o7jhaohx.fsf@HIDDEN>
Date: Tue, 08 Aug 2023 16:36:00 +0200
Message-ID: <m2pm3x1u0f.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)
On Tue, Aug 08 2023, Robert Pluim wrote:
> I think it=CA=BCs correct, as I have a change locally setting
> got_some_output for a different test case, but I=CA=BCm going to be a pai=
n,
> and ask Helmut to explain why, and see if I agree with his explanation
> (that=CA=BCs a very hairy loop)
Setting got_some_output=3D1, was the first thing that came to mind that
made the test case pass :-). A reasonable strategy, if we have a
comprehensive test suite. If the test suite is lacking, then writing
more tests is a good investment too. Ahem.
Setting got_some_output=3D1 will terminate the while(1) loop, but only on
the next iteration (around line process.c:5753) and only after another
useless call to xg_select. So maybe a change like below might be
better.
The variable got_some_output is also the return value of
wait_reading_process_output. So I thought that 1 is a reasonable value
to indicate "some event happened". 0 and negative values are converted
to nil in accept-process-output, so there isn't an obvious way to
indicate "not a timeout, 0 bytes read, but some other event". Maybe
MAX_INT could be used.
If you're asking why accept-process-output should return at all, then
the answer is that the socket is now writable and the caller probably
want's to know that.
Helmut
diff --git a/src/process.c b/src/process.c
index 2d6e08f16b5..f5fec84b53c 100644
--- a/src/process.c
+++ b/src/process.c
@@ -6028,6 +6028,9 @@ wait_reading_process_output (intmax_t time_limit, int=
nsecs, int read_kbd,
status_notify to do it later, it will read input
from the process before calling the sentinel. */
exec_sentinel (proc, build_string ("open\n"));
+ got_some_output =3D max (got_some_output, 1);
+ if (p =3D=3D wait_proc)
+ goto done_waiting;
}
=20
if (0 <=3D p->infd && !EQ (p->filter, Qt)
@@ -6038,6 +6041,8 @@ wait_reading_process_output (intmax_t time_limit, int=
nsecs, int read_kbd,
} /* End for each file descriptor. */
} /* End while exit conditions not met. */
=20
+
+ done_waiting:
unbind_to (count, Qnil);
=20
/* If calling from keyboard input, do not quit
X-Loop: help-debbugs@HIDDEN
Subject: bug#64975: 30.0.50; accept-process-output and async connect
Resent-From: Robert Pluim <rpluim@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Tue, 08 Aug 2023 15:18:02 +0000
Resent-Message-ID: <handler.64975.B64975.169150782325162 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 64975
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords:
To: Helmut Eller <eller.helmut@HIDDEN>
Cc: 64975 <at> debbugs.gnu.org, Eli Zaretskii <eliz@HIDDEN>
Received: via spool by 64975-submit <at> debbugs.gnu.org id=B64975.169150782325162
(code B ref 64975); Tue, 08 Aug 2023 15:18:02 +0000
Received: (at 64975) by debbugs.gnu.org; 8 Aug 2023 15:17:03 +0000
Received: from localhost ([127.0.0.1]:37489 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1qTOSE-0006Xm-I5
for submit <at> debbugs.gnu.org; Tue, 08 Aug 2023 11:17:02 -0400
Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]:47129)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <rpluim@HIDDEN>) id 1qTOSC-0006X9-LT
for 64975 <at> debbugs.gnu.org; Tue, 08 Aug 2023 11:17:01 -0400
Received: by mail-wm1-x330.google.com with SMTP id
5b1f17b1804b1-3fe426b8583so50871035e9.2
for <64975 <at> debbugs.gnu.org>; Tue, 08 Aug 2023 08:17:00 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20221208; t=1691507814; x=1692112614;
h=content-transfer-encoding:mime-version:message-id:date:references
:in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id
:reply-to; bh=Crg4AZbCrdCqJ2xD+sPpPgVF8nYMCVoyMnbV68jlWsQ=;
b=mBOYGcBpVV49rj5FgQ3GqDXoSXreJ+v535h6Ts9iNUi3UWJYfuHzihJXldLXPQQ9t2
davS9gBcqXfncC5wuO85v1plLz7XT2vkyO6d/QTFjS5gsnBLRI1Aj+DPhPsE7wPnD4d6
iDTT3OFSD8gRfyFrgZJAFSPmvRuqqIXpPzCpJa4gSgYiWRhi7X7OWmuX6cHxMVA4g6sJ
hHBYUm1w9JV/58HWIiRjKSOOspm5mckHT/KD/wbkQ6EwpHMb3+RY17FyPlDwCkFVhZ+u
Q3jXB13wN8v4GvcyajWboH4jyywgoTwUxt/4JI7C7N1q0MJ0D8G8cvq+ItTYU6q8sR6K
CPlw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20221208; t=1691507814; x=1692112614;
h=content-transfer-encoding:mime-version:message-id:date:references
:in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=Crg4AZbCrdCqJ2xD+sPpPgVF8nYMCVoyMnbV68jlWsQ=;
b=HwwZnc0/QkHZs7EdL6qcexEExs43McJQq9pFP39W0YkHCA4dKcyglQf8GXO8XnZGts
jHfVGWQlL4/T3NIl/+/KsdSwmOgxZZMLEyRtAlNdbMO1G712t9KX7cbM2mlv/I3ok0y4
vFJnjT7CQgDMiZc69kcTL1Sw68Ha50rRpWhq+t0bX8tpOgfDaUh+GHukBJtV/GE3kTAU
+D+okP4OtZz9vLvNuFbNST1UmzSMStcnICctuXTGW/MyFpDguhH1UekUrsS7ATTyo/md
qY9rlP35wihVCFWUex/MJOt9DK9beRFIRx5u+sQNnmLEYr7LPR5DoUpXkQ9v6esbSyaV
K7pQ==
X-Gm-Message-State: AOJu0Yyv5lqrZ1/WNIjeruImt34h29l9D8QGXbOIAmQMu7QYmRJdfVNI
YQUgRORG0St63WKpQFjMxxd9tl6b/Ao=
X-Google-Smtp-Source: AGHT+IGhQXyy3aBA0gnOEkJjtmh9KJpzEEhW8qx2WLmymUqima3YU9jsw1pBvrbOYkGVjnUTxr/7XQ==
X-Received: by 2002:a05:600c:152:b0:3fb:c9f4:1506 with SMTP id
w18-20020a05600c015200b003fbc9f41506mr110383wmm.1.1691507814234;
Tue, 08 Aug 2023 08:16:54 -0700 (PDT)
Received: from rltb ([2a01:e0a:3f3:fb50:7ff6:b79e:3a30:5923])
by smtp.gmail.com with ESMTPSA id
n12-20020adff08c000000b00317b5c8a4f1sm13843050wro.60.2023.08.08.08.16.53
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Tue, 08 Aug 2023 08:16:53 -0700 (PDT)
From: Robert Pluim <rpluim@HIDDEN>
In-Reply-To: <m2pm3x1u0f.fsf@HIDDEN> (Helmut Eller's message of "Tue, 08
Aug 2023 16:36:00 +0200")
References: <m2wmygdx7v.fsf@HIDDEN> <838rapu9fu.fsf@HIDDEN>
<87o7jhaohx.fsf@HIDDEN> <m2pm3x1u0f.fsf@HIDDEN>
Date: Tue, 08 Aug 2023 17:16:52 +0200
Message-ID: <87350ta7iz.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)
>>>>> On Tue, 08 Aug 2023 16:36:00 +0200, Helmut Eller <eller.helmut@gmail.=
com> said:
Helmut> On Tue, Aug 08 2023, Robert Pluim wrote:
>> I think it=CA=BCs correct, as I have a change locally setting
>> got_some_output for a different test case, but I=CA=BCm going to be =
a pain,
>> and ask Helmut to explain why, and see if I agree with his explanati=
on
>> (that=CA=BCs a very hairy loop)
Helmut> Setting got_some_output=3D1, was the first thing that came to m=
ind that
Helmut> made the test case pass :-). A reasonable strategy, if we have=
a
Helmut> comprehensive test suite. If the test suite is lacking, then w=
riting
Helmut> more tests is a good investment too. Ahem.
Submitting new tests is always good :-)
Helmut> Setting got_some_output=3D1 will terminate the while(1) loop, b=
ut only on
Helmut> the next iteration (around line process.c:5753) and only after =
another
Helmut> useless call to xg_select. So maybe a change like below might =
be
Helmut> better.
It also means we finish looping through all the channels, unlike your
patch below. I think that=CA=BCs a smaller and thus better change, and
aligns more with the docstring:
Allow any pending output from subprocesses to be read by Emacs.
It is given to their filter functions.
So if the rest of the test cases pass, I think we should apply your
original patch.
Helmut> The variable got_some_output is also the return value of
Helmut> wait_reading_process_output. So I thought that 1 is a reasonab=
le value
Helmut> to indicate "some event happened". 0 and negative values are c=
onverted
Helmut> to nil in accept-process-output, so there isn't an obvious way =
to
Helmut> indicate "not a timeout, 0 bytes read, but some other event". =
Maybe
Helmut> MAX_INT could be used.
1 is ok as a value.
Helmut> If you're asking why accept-process-output should return at all=
, then
Helmut> the answer is that the socket is now writable and the caller pr=
obably
Helmut> want's to know that.
I think that=CA=BCs ok, since any actual input received from the process
will get passed to the filter function anyway.
Eli, the docstring also says
Optional argument PROCESS means to return only after output is
received from PROCESS or PROCESS closes the connection.
Do we need to add something like "or the underlying network connection
becomes available"? (I wonder if that=CA=BCs too strong a guarantee).
Thanks
Robert
--=20
X-Loop: help-debbugs@HIDDEN
Subject: bug#64975: 30.0.50; accept-process-output and async connect
Resent-From: Eli Zaretskii <eliz@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Tue, 08 Aug 2023 15:34:02 +0000
Resent-Message-ID: <handler.64975.B64975.16915088084765 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 64975
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords:
To: Robert Pluim <rpluim@HIDDEN>
Cc: 64975 <at> debbugs.gnu.org, eller.helmut@HIDDEN
Received: via spool by 64975-submit <at> debbugs.gnu.org id=B64975.16915088084765
(code B ref 64975); Tue, 08 Aug 2023 15:34:02 +0000
Received: (at 64975) by debbugs.gnu.org; 8 Aug 2023 15:33:28 +0000
Received: from localhost ([127.0.0.1]:37550 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1qTOi8-0001En-35
for submit <at> debbugs.gnu.org; Tue, 08 Aug 2023 11:33:28 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:42986)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <eliz@HIDDEN>) id 1qTOi3-0001ER-0z
for 64975 <at> debbugs.gnu.org; Tue, 08 Aug 2023 11:33:26 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
id 1qTOhx-0006Kn-OH; Tue, 08 Aug 2023 11:33:17 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From:
Date; bh=ytTUa6AFnYhWik/ervM6TxxqkLANiYk5K9nBbHWx0bU=; b=ByWPkK5r7mblUqvRkbA5
icCeSt0FWNMthq7SH0TaC/yZuU22NjREI6J2xhoz+j9KkKXEW3JAJV2+5jdG3WoJgFM2DP0BX4+Qy
cgx7Q5PY/miadkXPve1XhxUz0BTqSzl0Te0jRI3GmYYbuaQi9l1RN7rYp/8TKder+EXJTHe83qNhE
ENMBdEA2QR2kJJ8vNH/O9T1M6jH6Wdvp8tz+2tlsAjd1wEUAG4Le0UbkKHu9ryI5PyGOsOuWEsznk
55EC97xF8D+EXiP36x7dCsLo4ipdv7lgDp3ZEdRXtMqTnffxlhAOHcPd71THnnLUA7PD3XtYI61tC
Of70U9fpFFof4w==;
Date: Tue, 08 Aug 2023 18:33:39 +0300
Message-Id: <83msz1mtv0.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
In-Reply-To: <87350ta7iz.fsf@HIDDEN> (message from Robert Pluim on Tue, 08
Aug 2023 17:16:52 +0200)
References: <m2wmygdx7v.fsf@HIDDEN> <838rapu9fu.fsf@HIDDEN>
<87o7jhaohx.fsf@HIDDEN> <m2pm3x1u0f.fsf@HIDDEN>
<87350ta7iz.fsf@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)
> From: Robert Pluim <rpluim@HIDDEN>
> Cc: Eli Zaretskii <eliz@HIDDEN>, 64975 <at> debbugs.gnu.org
> Date: Tue, 08 Aug 2023 17:16:52 +0200
>
> Eli, the docstring also says
>
> Optional argument PROCESS means to return only after output is
> received from PROCESS or PROCESS closes the connection.
>
> Do we need to add something like "or the underlying network connection
> becomes available"? (I wonder if thatʼs too strong a guarantee).
I'd leave this alone for now. Connection event was always treated as
"output".
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.