X-Loop: help-debbugs@HIDDEN
Subject: bug#51177: 29.0.50; stop-process on pipes
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: Wed, 13 Oct 2021 09:21:02 +0000
Resent-Message-ID: <handler.51177.B.163411681526189 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 51177
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords:
To: 51177 <at> debbugs.gnu.org
X-Debbugs-Original-To: bug-gnu-emacs@HIDDEN
Received: via spool by submit <at> debbugs.gnu.org id=B.163411681526189
(code B ref -1); Wed, 13 Oct 2021 09:21:02 +0000
Received: (at submit) by debbugs.gnu.org; 13 Oct 2021 09:20:15 +0000
Received: from localhost ([127.0.0.1]:58281 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1maaQp-0006oL-7z
for submit <at> debbugs.gnu.org; Wed, 13 Oct 2021 05:20:15 -0400
Received: from lists.gnu.org ([209.51.188.17]:53438)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <eller.helmut@HIDDEN>) id 1maaQn-0006oB-DF
for submit <at> debbugs.gnu.org; Wed, 13 Oct 2021 05:20:14 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:57398)
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 1maaQm-0004os-SH
for bug-gnu-emacs@HIDDEN; Wed, 13 Oct 2021 05:20:12 -0400
Received: from mail-ed1-x530.google.com ([2a00:1450:4864:20::530]:36727)
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 1maaQl-0004H8-1T
for bug-gnu-emacs@HIDDEN; Wed, 13 Oct 2021 05:20:12 -0400
Received: by mail-ed1-x530.google.com with SMTP id d3so7451382edp.3
for <bug-gnu-emacs@HIDDEN>; Wed, 13 Oct 2021 02:20:10 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
h=from:to:subject:date:message-id:mime-version
:content-transfer-encoding;
bh=P28GP7knu20VbGHqOe/1iqoLoN3LC1JbnNhq1yyP+bw=;
b=oDi1OqqbubzNPL6p6raB49j6c8ILndTVyp/tKy2DbP5hrWRJPwULdf8dNoGnAZYdVS
ylBOm39xcWsB1dxc1CdKgsXL7kB6Tomes9MZ8Co5Ld7jUbU91uTO/lkLB5YLJdk24Ij+
oMAD0pQauSw7heCYQF3XLHkFTLmW71FIlo5lzHviXaQ0a+3hr61YZxivdSov5KLnB2XS
181SlrjUpieJCZSKbCMD3bm91dKWt2qh6c8AgCnZEBVjQBtsTbnY2j6HLfEFmE6BL4M5
sYdlLK7hmbAMRNQH3Y0bCIO1JTJfCOaZ3HbD6nvW5j0Bfzd52GhCIZMGfyZxFmXXDbn6
TFDA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20210112;
h=x-gm-message-state:from:to:subject:date:message-id:mime-version
:content-transfer-encoding;
bh=P28GP7knu20VbGHqOe/1iqoLoN3LC1JbnNhq1yyP+bw=;
b=rkcQGMQ0adoaCnqUrfL0TTTHT+Oakf3ZFD2RENv3J2IbtTdUG+ynkKsJPmKFGa/ovR
d243cL4Y5m8DzaYlAfkbXjfpI6xivmLKjnXITGGpMQuHTEiaj41ornFyfRPYviRxy2ZV
dqcAT714VRpeLz8EAN9cJRIgnSshNOUxJJ4we5zAbeyr4J97cfuuLqa5uqekNNAh+HEW
DaOJkg4Vh+GAhimotYgPNC0xwyfUe+4OJPYWQ8T4bzVG3tuDnqUTwXI5cFjwOSUJEWMZ
hRKzV6qe0fQsbqcvaYDQbGYvCJNBGRHCbzya+W15rw/6oe1Ic2Qa0wTqdTCXxKwgY8w2
qqeQ==
X-Gm-Message-State: AOAM530pOsMgMx78rrKQihUZSzibyXOCq/nrrK0YO1sMMf2riO1+ivC1
e9z8zVr6PUeQ10TQlIZKLKE89pnqE5A=
X-Google-Smtp-Source: ABdhPJwRKQNpnbn+B/XkSgH7WDcAdHDfb63xUemsPMBqn4rAfK1RAxXiFnB4e5lIWLi1WxH7pGs1KA==
X-Received: by 2002:a17:906:82c8:: with SMTP id
a8mr39493875ejy.384.1634116808299;
Wed, 13 Oct 2021 02:20:08 -0700 (PDT)
Received: from caladan ([31.177.113.240])
by smtp.gmail.com with ESMTPSA id b2sm7625315edv.73.2021.10.13.02.20.07
for <bug-gnu-emacs@HIDDEN>
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 13 Oct 2021 02:20:07 -0700 (PDT)
From: Helmut Eller <eller.helmut@HIDDEN>
Date: Wed, 13 Oct 2021 11:20:01 +0200
Message-ID: <m2y26xqo1q.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
Received-SPF: pass client-ip=2a00:1450:4864:20::530;
envelope-from=eller.helmut@HIDDEN; helo=mail-ed1-x530.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 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.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: -2.3 (--)
I would like to request this feature: stop-process, when called with a
sub-process that is connected via pipes, should use delete_read_fd. It
should basically do the same as for sockets.
Currently, stop-process uses some difficult to understand logic and
eventually sends SIGSTOP to the process. This might work in theory, but
in practice it can take a long time before Emacs stops receiving output.
The code below illustrates the problem with two examples:
test-stop-process and test-signal-process. One uses stop-process while
the other uses (signal-process 'SIGSTOP). The output is something like
this:
emacs -Q --batch -l stop.el -f ert-run-tests-batch-and-exit
Running 2 tests (2021-10-13 11:00:45+0200, selector =E2=80=98t=E2=80=99)
use-signals =3D t; my-counter =3D 17 buffer-size =3D 69672
passed 1/2 test-signal-process (0.200925 sec)
use-signals =3D nil; my-counter =3D 1099 buffer-size =3D 4501504
passed 2/2 test-stop-process (0.201133 sec)
With signal-process, the filter function is called 17 times before the
sub-process stops sending output.
With stop-process, it takes 1099 calls and Emacs receives 4 megabytes of
output. These numbers can be even higher, if the argument to sleep-for
is larger.
If we would use delete_read_fd, then the filter function would be called
exactly once. At least I think so. That would, of course, be much more
desirable.
Helmut
(ert-deftest test-stop-process () (run-test nil))
(ert-deftest test-signal-process () (run-test t))
(defun my-start-process ()
(let ((buffer (generate-new-buffer " some-process")))
(make-process :command '("cat" "/dev/zero")
:name (buffer-name buffer)
:buffer buffer
:filter #'my-filter
:connection-type 'pipe)))
(defvar my-counter 0)
(defun my-filter (proc string)
(setq my-counter (1+ my-counter))
(with-current-buffer (process-buffer proc)
(goto-char (point-max))
(insert string)
;; (message "stopping: %s %s %s" (buffer-size)
;; (process-id proc) (process-status proc))
(cond ((process-get proc 'use-signals)
(signal-process proc 'SIGSTOP))
(t
(stop-process proc)))))
(defun run-test (use-signals)
(let ((proc (my-start-process))
(my-counter 0))
(process-put proc 'use-signals use-signals)
(sleep-for 0.2)
(while (=3D my-counter 0)
(accept-process-output p 0.1))
(message "use-signals =3D %s; my-counter =3D %s buffer-size =3D %s"=20
use-signals my-counter
(buffer-size (process-buffer proc)))))
In GNU Emacs 29.0.50 (build 3, x86_64-pc-linux-gnu, GTK+ Version 3.24.24, c=
airo version 1.16.0)
of 2021-10-11 built on caladan
Repository revision: 2810fe6bfca182e4376d818b5510507d5ff7e1b5
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12011000
System Description: Debian GNU/Linux 11 (bullseye)
Configured using:
'configure --with-xpm=3Difavailable --with-jpeg=3Difavailable
--with-gif=3Difavailable --with-tiff=3Difavailable'
Configured features:
CAIRO DBUS FREETYPE GLIB GMP GNUTLS GSETTINGS HARFBUZZ LIBSELINUX
LIBSYSTEMD LIBXML2 MODULES NOTIFY INOTIFY PDUMPER PNG SECCOMP SOUND
THREADS TOOLKIT_SCROLL_BARS X11 XDBE XIM 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#51177: Acknowledgement (29.0.50; stop-process on pipes) Message-ID: <handler.51177.B.163411681526189.ack <at> debbugs.gnu.org> References: <m2y26xqo1q.fsf@HIDDEN> X-Gnu-PR-Message: ack 51177 X-Gnu-PR-Package: emacs Reply-To: 51177 <at> debbugs.gnu.org Date: Wed, 13 Oct 2021 09:21:02 +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 51177 <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 51177: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D51177 GNU Bug Tracking System Contact help-debbugs@HIDDEN with problems
X-Loop: help-debbugs@HIDDEN
Subject: bug#51177: 29.0.50; stop-process on pipes
Resent-From: Lars Ingebrigtsen <larsi@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Wed, 13 Oct 2021 11:46:02 +0000
Resent-Message-ID: <handler.51177.B51177.163412551518182 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 51177
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords:
To: Helmut Eller <eller.helmut@HIDDEN>
Cc: 51177 <at> debbugs.gnu.org
Received: via spool by 51177-submit <at> debbugs.gnu.org id=B51177.163412551518182
(code B ref 51177); Wed, 13 Oct 2021 11:46:02 +0000
Received: (at 51177) by debbugs.gnu.org; 13 Oct 2021 11:45:15 +0000
Received: from localhost ([127.0.0.1]:58646 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1mach8-0004ii-JG
for submit <at> debbugs.gnu.org; Wed, 13 Oct 2021 07:45:14 -0400
Received: from quimby.gnus.org ([95.216.78.240]:49788)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <larsi@HIDDEN>) id 1mach7-0004bg-Ke
for 51177 <at> debbugs.gnu.org; Wed, 13 Oct 2021 07:45:14 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
List-Subscribe:List-Post:List-Owner:List-Archive;
bh=Xkn53zVxp7QUKFELDve0rkR4u0qP6iimkXNEY0xEQbQ=; b=hM4gl+hj2mXEb5xBGCJLM/tQN/
G81FOPpf9wj/Dh05WzNUbGlDrEChNgfMcwZTMIFu5P2E9XKoU6h7ntRvy2SWqUxAGNWqhksbKmfL2
dxg6596QSXFZbtFBdHAxYSNHwe7fOpX6Q7eJBJad7fifgBn0mWwgZXmqKf+U3MMK08sI=;
Received: from [84.212.220.105] (helo=elva)
by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.92) (envelope-from <larsi@HIDDEN>)
id 1macgz-0007mG-KD; Wed, 13 Oct 2021 13:45:08 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
References: <m2y26xqo1q.fsf@HIDDEN>
X-Now-Playing: Sylvester's _Sylvester-Step II_: "Just You And Me Forever"
Date: Wed, 13 Oct 2021 13:45:05 +0200
In-Reply-To: <m2y26xqo1q.fsf@HIDDEN> (Helmut Eller's message of "Wed, 13
Oct 2021 11:20:01 +0200")
Message-ID: <87pms96tdq.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
has NOT identified this incoming email as spam. The original
message has been attached to this so you can view it or label
similar future email. If you have any questions, see
@@CONTACT_ADDRESS@@ for details.
Content preview: Helmut Eller <eller.helmut@HIDDEN> writes: > I would like
to request this feature: stop-process, when called with a > sub-process that
is connected via pipes, should use delete_read_fd. It > should basically
do the same as for sockets. > > Cur [...]
Content analysis details: (-2.9 points, 5.0 required)
pts rule name description
---- ---------------------- --------------------------------------------------
-1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP
-1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
[score: 0.0000]
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 (---)
Helmut Eller <eller.helmut@HIDDEN> writes:
> I would like to request this feature: stop-process, when called with a
> sub-process that is connected via pipes, should use delete_read_fd. It
> should basically do the same as for sockets.
>
> Currently, stop-process uses some difficult to understand logic and
> eventually sends SIGSTOP to the process. This might work in theory, but
> in practice it can take a long time before Emacs stops receiving output.
You're supposed to be able to use `continue-process' on the process
after stopping it for a while -- that's not possible if you delete the
fd.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
X-Loop: help-debbugs@HIDDEN
Subject: bug#51177: 29.0.50; stop-process on pipes
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: Wed, 13 Oct 2021 13:03:02 +0000
Resent-Message-ID: <handler.51177.B51177.16341301221475 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 51177
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords:
To: Helmut Eller <eller.helmut@HIDDEN>
Cc: 51177 <at> debbugs.gnu.org
Received: via spool by 51177-submit <at> debbugs.gnu.org id=B51177.16341301221475
(code B ref 51177); Wed, 13 Oct 2021 13:03:02 +0000
Received: (at 51177) by debbugs.gnu.org; 13 Oct 2021 13:02:02 +0000
Received: from localhost ([127.0.0.1]:58995 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1madtS-0000Nd-2W
for submit <at> debbugs.gnu.org; Wed, 13 Oct 2021 09:02:02 -0400
Received: from eggs.gnu.org ([209.51.188.92]:50692)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <eliz@HIDDEN>) id 1madtQ-0000NF-K8
for 51177 <at> debbugs.gnu.org; Wed, 13 Oct 2021 09:02:01 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:58712)
by eggs.gnu.org with esmtp (Exim 4.90_1)
(envelope-from <eliz@HIDDEN>)
id 1madtL-0005qy-6s; Wed, 13 Oct 2021 09:01:55 -0400
Received: from [87.69.77.57] (port=1411 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 1madtD-0007an-Gy; Wed, 13 Oct 2021 09:01:52 -0400
Date: Wed, 13 Oct 2021 16:01:43 +0300
Message-Id: <83r1cpnknc.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
In-Reply-To: <m2y26xqo1q.fsf@HIDDEN> (message from Helmut Eller on Wed, 13
Oct 2021 11:20:01 +0200)
References: <m2y26xqo1q.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: Wed, 13 Oct 2021 11:20:01 +0200
>
>
> I would like to request this feature: stop-process, when called with a
> sub-process that is connected via pipes, should use delete_read_fd. It
> should basically do the same as for sockets.
Unlike with sockets, we are talking about a real sub-process on the
other end of the pipe, and it will now get SIGPIPE. Are we sure this
is OK? perhaps it will interfere with the process's cleanup when it
receives a signal?
If there's any real possibility this could change behavior, I think we
should make such behavior optional.
X-Loop: help-debbugs@HIDDEN
Subject: bug#51177: 29.0.50; stop-process on pipes
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: Wed, 13 Oct 2021 13:40:02 +0000
Resent-Message-ID: <handler.51177.B51177.16341323874953 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 51177
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords:
To: Lars Ingebrigtsen <larsi@HIDDEN>
Cc: 51177 <at> debbugs.gnu.org
Received: via spool by 51177-submit <at> debbugs.gnu.org id=B51177.16341323874953
(code B ref 51177); Wed, 13 Oct 2021 13:40:02 +0000
Received: (at 51177) by debbugs.gnu.org; 13 Oct 2021 13:39:47 +0000
Received: from localhost ([127.0.0.1]:59072 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1maeTy-0001Hp-Qb
for submit <at> debbugs.gnu.org; Wed, 13 Oct 2021 09:39:47 -0400
Received: from mail-ed1-f45.google.com ([209.85.208.45]:42753)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <eller.helmut@HIDDEN>) id 1maeTx-0001Hc-Fu
for 51177 <at> debbugs.gnu.org; Wed, 13 Oct 2021 09:39:45 -0400
Received: by mail-ed1-f45.google.com with SMTP id t16so10389544eds.9
for <51177 <at> debbugs.gnu.org>; Wed, 13 Oct 2021 06:39:45 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
h=from:to:cc:subject:references:date:in-reply-to:message-id
:user-agent:mime-version;
bh=OyCpOSm4JrJBNj9SpeUTy3q3mnphzhfOa2SMWCxOHHA=;
b=UjMvHJGUho6dcsDlA2jLDPhcDr7D5shSdQpnyrVA6nIwqkJnbPiKo++AzA5y7YEKJ8
7co9P3dSZxzeYUu7pxtbl6ZuwUXilhbabcy7BOW7rMHyhR3CGUmAmyU01o0tb2OCasEh
KHrnqVOlqVqLO3+G8tLGrEfKw1reg1+OJFBPAoUr2045xgrA6dI7RXeaQ16KwuI17XJG
YYBsBo6mrgFwnQotSJNc246b+7LfYOEomvBbGqqvcwSLa6rO0E7Jy9NGyFVd677jCggl
KjFshel8uS4WNgRNWoktDRn3bx/uaxblv/oghZLEWhNQo93om/g8fCg/KZKiQNMFIm/5
R5og==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20210112;
h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to
:message-id:user-agent:mime-version;
bh=OyCpOSm4JrJBNj9SpeUTy3q3mnphzhfOa2SMWCxOHHA=;
b=juBrF/MlgYKX/CClloL/lK8S+hhCo/+xnuxBAFox9wWalz6/y3lM5OoGyAA2qSa3C5
8Z80EaY9yLwJ63fdvD0A5uLRvxZ4ShCwsQqGzSzgVluA3lQl5iyrWoe4JFRg58yjrAvY
Kl+DrRlIIm+9z9MaKhEELz4ayNAn0/uWRnzPoL9V9rJQcpAcjPBNqOcdOz8kN9wCu1dx
78ssT6PoG6IO53ElLMfZ5KTYku1dNGFe+dRqby6JrIFWXnq5QB0x5HKWpNLlrYvygsan
e8Slke/LG4jIO8Y1B9oPxBCG/c/CoexEE01FFRsNBSaFSrJp1l+KdD0Th3hU1/2Lc2Nk
Cwfg==
X-Gm-Message-State: AOAM5303YSjTAvRdT6MpDPW23jLHGp+1HJ3ZHbA9OE2i2kKSdctHzDw7
9dh5Uxorex8gPcB2s2ju6KP0W70QGpA=
X-Google-Smtp-Source: ABdhPJytSYINhr+FKDaE/OEaUGfeDl3y2z+iMY/aYWWf9zmv83/lqY2DK4lX4Lc/FH9P2ESqzCR86A==
X-Received: by 2002:a05:6402:694:: with SMTP id
f20mr9959534edy.100.1634132372585;
Wed, 13 Oct 2021 06:39:32 -0700 (PDT)
Received: from caladan ([31.177.113.240])
by smtp.gmail.com with ESMTPSA id s3sm6872500ejm.49.2021.10.13.06.39.31
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 13 Oct 2021 06:39:31 -0700 (PDT)
From: Helmut Eller <eller.helmut@HIDDEN>
References: <m2y26xqo1q.fsf@HIDDEN> <87pms96tdq.fsf@HIDDEN>
Date: Wed, 13 Oct 2021 15:39:30 +0200
In-Reply-To: <87pms96tdq.fsf@HIDDEN> (Lars Ingebrigtsen's message of "Wed,
13 Oct 2021 13:45:05 +0200")
Message-ID: <m2r1cpgi25.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
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 (-)
--=-=-=
Content-Type: text/plain
On Wed, Oct 13 2021, Lars Ingebrigtsen wrote:
> Helmut Eller <eller.helmut@HIDDEN> writes:
>
>> I would like to request this feature: stop-process, when called with a
>> sub-process that is connected via pipes, should use delete_read_fd. It
>> should basically do the same as for sockets.
>>
>> Currently, stop-process uses some difficult to understand logic and
>> eventually sends SIGSTOP to the process. This might work in theory, but
>> in practice it can take a long time before Emacs stops receiving output.
>
> You're supposed to be able to use `continue-process' on the process
> after stopping it for a while -- that's not possible if you delete the
> fd.
Here "deleting" only removes the fd from the event loop; it doesn't
close the fd. The fd can be added back by `continue-process'.
The patch below implements the basic idea. Though, not very nicely
because in this case p->command can't be used to indicate that the fd is
temporarily "deleted". It writes something to the process->plist. A
proper patch would probably do this in a better way:
--=-=-=
Content-Type: text/x-diff
Content-Disposition: inline; filename=stop.patch
diff --git a/src/process.c b/src/process.c
index 746cdc0428..5b833187d5 100644
--- a/src/process.c
+++ b/src/process.c
@@ -6921,15 +6921,26 @@ of incoming traffic. */)
(Lisp_Object process, Lisp_Object current_group)
{
if (PROCESSP (process) && (NETCONN_P (process) || SERIALCONN_P (process)
- || PIPECONN_P (process)))
+ || PIPECONN_P (process)
+ || (EQ (Fprocess_type (process), Qreal)
+ && NILP (Fprocess_tty_name (process)))))
{
struct Lisp_Process *p;
p = XPROCESS (process);
- if (NILP (p->command)
+ if ((NILP (p->command)
+ || (EQ (Fprocess_type (process), Qreal)
+ && NILP (Fprocess_tty_name (process))))
&& p->infd >= 0)
delete_read_fd (p->infd);
- pset_command (p, Qt);
+
+ if (NILP (p->command))
+ pset_command (p, Qt);
+ else if (EQ (Fprocess_type (process), Qreal)
+ && NILP (Fprocess_tty_name (process)))
+ Fset_process_plist (process,
+ Fplist_put (Fprocess_plist (process),
+ Qstop, Qt));
return process;
}
#ifndef SIGTSTP
@@ -6948,13 +6959,18 @@ traffic. */)
(Lisp_Object process, Lisp_Object current_group)
{
if (PROCESSP (process) && (NETCONN_P (process) || SERIALCONN_P (process)
- || PIPECONN_P (process)))
+ || PIPECONN_P (process)
+ || (EQ (Fprocess_type (process), Qreal)
+ && NILP (Fprocess_tty_name (process)))))
{
struct Lisp_Process *p;
p = XPROCESS (process);
eassert (p->infd < FD_SETSIZE);
- if (EQ (p->command, Qt)
+ if ((EQ (p->command, Qt)
+ || (EQ (Fprocess_type (process), Qreal)
+ && NILP (Fprocess_tty_name (process))
+ && EQ (Fplist_get (Fprocess_plist (process), Qstop), Qt)))
&& p->infd >= 0
&& (!EQ (p->filter, Qt) || EQ (p->status, Qlisten)))
{
@@ -6966,7 +6982,14 @@ traffic. */)
tcflush (p->infd, TCIFLUSH);
#endif /* not WINDOWSNT */
}
- pset_command (p, Qnil);
+ if (EQ (p->command, Qt))
+ pset_command (p, Qnil);
+ else if (EQ (Fprocess_type (process), Qreal)
+ && NILP (Fprocess_tty_name (process))
+ && EQ (Fplist_get (Fprocess_plist (process), Qstop), Qt))
+ Fset_process_plist (process,
+ Fplist_put (Fprocess_plist (process),
+ Qstop, Qnil));
return process;
}
#ifdef SIGCONT
--=-=-=
Content-Type: text/plain
Helmut
--=-=-=--
X-Loop: help-debbugs@HIDDEN
Subject: bug#51177: 29.0.50; stop-process on pipes
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: Wed, 13 Oct 2021 14:05:02 +0000
Resent-Message-ID: <handler.51177.B51177.16341338759599 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 51177
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords:
To: Eli Zaretskii <eliz@HIDDEN>
Cc: 51177 <at> debbugs.gnu.org
Received: via spool by 51177-submit <at> debbugs.gnu.org id=B51177.16341338759599
(code B ref 51177); Wed, 13 Oct 2021 14:05:02 +0000
Received: (at 51177) by debbugs.gnu.org; 13 Oct 2021 14:04:35 +0000
Received: from localhost ([127.0.0.1]:32964 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1maerz-0002Uk-Em
for submit <at> debbugs.gnu.org; Wed, 13 Oct 2021 10:04:35 -0400
Received: from mail-ed1-f48.google.com ([209.85.208.48]:38663)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <eller.helmut@HIDDEN>) id 1maery-0002UV-FC
for 51177 <at> debbugs.gnu.org; Wed, 13 Oct 2021 10:04:35 -0400
Received: by mail-ed1-f48.google.com with SMTP id d9so10788330edh.5
for <51177 <at> debbugs.gnu.org>; Wed, 13 Oct 2021 07:04:34 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
h=from:to:cc:subject:references:date:in-reply-to:message-id
:user-agent:mime-version;
bh=2bkU7BWzdfUmZ/L9sRU3l0Y0AFo2zZYmRdz/aD+L12A=;
b=B+DufA/SHK3m49IT3tIe4BErbNdqJ5dqzIZuX8sSDw4iZMZPtcpMBNIS04J04+LWyT
zhlXtMXNMGxz8QYWpvgx1oEraQm9E1qTetkpQ3El/x8WLIFBO0qnQW4s7vxAfQFlJ7M8
5RG31+cDujTvYE8ABJQR5pUqzlYA4bUf7tGA1w0nXyeTYnn2U9VGxsWH5ErcneQQeGoY
2jPTuj+KqGrBbkvZUOVwJsgIA0gn1S20jZalivOfRJDmrAkN/PU2s8yqMISgjjBBMFQ4
cKwaBpQsZZOeSgQfv0+wyy18IYHyXXqEv8fQFzPaUjT6PSnJok6Y184PN/eCpAKuH00a
jB1g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20210112;
h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to
:message-id:user-agent:mime-version;
bh=2bkU7BWzdfUmZ/L9sRU3l0Y0AFo2zZYmRdz/aD+L12A=;
b=Y8b8oaqBfkiayV9GFc1IUU17ilcR0ItVM7N1tuPZEkeWdNsXT+IqcCVQxLEKjZep/R
JulJxK9F4S4TbhvcUbNDt6KkwJyaJ3nROpkc/QZ5gJbL0NfFp6JHXQmQ4T/yCr6khlQ3
rXUJxvY+EEeZlNytMLmz9drz5JtScp7Cz24kQ3t0L/YrQm+NXsA8vNgh4k66PdNyvXOi
suMCa4WnKR7SlFIFuO5gxCI85fYUc5eS3nbEjBqKC0QbBslBb6MKrBiYf3kqUJp2kwI9
rxUVn66kMtJTS4V01/gsIkhbveGdGIbZzl0cftuFe6gjIMD2ySL86CBT/pUC2zjEhoxY
9p8g==
X-Gm-Message-State: AOAM530Kuqrm7p4WKOmS+fQZnab+VpHQm6eqPYcy5T5ZcCd788/vmQ3E
5b5DYOJc6QBseY5u+cGfazrrNDk8MPk=
X-Google-Smtp-Source: ABdhPJx5aA8F8NJ8/KbtjMvewtYbhMaZhVjMRpZw+CkF4fVVO09DTGFcptjIHJOzD24srdlTLlRAcw==
X-Received: by 2002:a50:e183:: with SMTP id k3mr10266667edl.22.1634133860299;
Wed, 13 Oct 2021 07:04:20 -0700 (PDT)
Received: from caladan ([31.177.113.240])
by smtp.gmail.com with ESMTPSA id f25sm6693439ejb.34.2021.10.13.07.04.19
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 13 Oct 2021 07:04:19 -0700 (PDT)
From: Helmut Eller <eller.helmut@HIDDEN>
References: <m2y26xqo1q.fsf@HIDDEN> <83r1cpnknc.fsf@HIDDEN>
Date: Wed, 13 Oct 2021 16:04:18 +0200
In-Reply-To: <83r1cpnknc.fsf@HIDDEN> (Eli Zaretskii's message of "Wed, 13 Oct
2021 16:01:43 +0300")
Message-ID: <m2h7dlggwt.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
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 Wed, Oct 13 2021, Eli Zaretskii wrote:
>> From: Helmut Eller <eller.helmut@HIDDEN>
>> Date: Wed, 13 Oct 2021 11:20:01 +0200
>>
>>
>> I would like to request this feature: stop-process, when called with a
>> sub-process that is connected via pipes, should use delete_read_fd. It
>> should basically do the same as for sockets.
>
> Unlike with sockets, we are talking about a real sub-process on the
> other end of the pipe, and it will now get SIGPIPE. Are we sure this
> is OK? perhaps it will interfere with the process's cleanup when it
> receives a signal?
A valid concern, yes.
> If there's any real possibility this could change behavior, I think we
> should make such behavior optional.
Maybe we could add a pair of functions that exposes delete_read_fd and
add_process_read_fd more directly.
Helmut
X-Loop: help-debbugs@HIDDEN
Subject: bug#51177: 29.0.50; stop-process on pipes
Resent-From: <jakanakaevangeli@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Thu, 14 Oct 2021 07:48:01 +0000
Resent-Message-ID: <handler.51177.B51177.163419767128571 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 51177
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords:
To: Helmut Eller <eller.helmut@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>
Cc: 51177 <at> debbugs.gnu.org
Received: via spool by 51177-submit <at> debbugs.gnu.org id=B51177.163419767128571
(code B ref 51177); Thu, 14 Oct 2021 07:48:01 +0000
Received: (at 51177) by debbugs.gnu.org; 14 Oct 2021 07:47:51 +0000
Received: from localhost ([127.0.0.1]:34506 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1mavSx-0007Qk-GF
for submit <at> debbugs.gnu.org; Thu, 14 Oct 2021 03:47:51 -0400
Received: from kamnitnik.top ([209.250.245.214]:36186)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <jakanakaevangeli@HIDDEN>) id 1mavSw-0007QW-6L
for 51177 <at> debbugs.gnu.org; Thu, 14 Oct 2021 03:47:50 -0400
Received: from localhost (BSN-77-156-43.static.siol.net [193.77.156.43])
by kamnitnik.top (Postfix) with ESMTPSA id CFF369CFAE;
Thu, 14 Oct 2021 07:47:48 +0000 (UTC)
From: <jakanakaevangeli@HIDDEN>
In-Reply-To: <m2h7dlggwt.fsf@HIDDEN>
References: <m2y26xqo1q.fsf@HIDDEN> <83r1cpnknc.fsf@HIDDEN>
<m2h7dlggwt.fsf@HIDDEN>
Date: Thu, 14 Oct 2021 09:51:29 +0200
Message-ID: <87v920cada.fsf@miha-pc>
MIME-Version: 1.0
Content-Type: text/plain
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 (-)
Helmut Eller <eller.helmut@HIDDEN> writes:
> On Wed, Oct 13 2021, Eli Zaretskii wrote:
>
>>> From: Helmut Eller <eller.helmut@HIDDEN>
>>> Date: Wed, 13 Oct 2021 11:20:01 +0200
>>>
>>>
>>> I would like to request this feature: stop-process, when called with a
>>> sub-process that is connected via pipes, should use delete_read_fd. It
>>> should basically do the same as for sockets.
>>
>> Unlike with sockets, we are talking about a real sub-process on the
>> other end of the pipe, and it will now get SIGPIPE. Are we sure this
>> is OK? perhaps it will interfere with the process's cleanup when it
>> receives a signal?
>
> A valid concern, yes.
>
>> If there's any real possibility this could change behavior, I think we
>> should make such behavior optional.
>
> Maybe we could add a pair of functions that exposes delete_read_fd and
> add_process_read_fd more directly.
>
> Helmut
I haven't read you request and patch in detail, but have you tried
"(set-process-filter proc t)"? Looking at the doc string of
set-process-filter and reading its code suggests that this may be what
you want.
Best regards.
X-Loop: help-debbugs@HIDDEN
Subject: bug#51177: 29.0.50; stop-process on pipes
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: Thu, 14 Oct 2021 08:01:01 +0000
Resent-Message-ID: <handler.51177.B51177.163419841929944 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 51177
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords:
To: <jakanakaevangeli@HIDDEN>
Cc: Eli Zaretskii <eliz@HIDDEN>, 51177 <at> debbugs.gnu.org
Received: via spool by 51177-submit <at> debbugs.gnu.org id=B51177.163419841929944
(code B ref 51177); Thu, 14 Oct 2021 08:01:01 +0000
Received: (at 51177) by debbugs.gnu.org; 14 Oct 2021 08:00:19 +0000
Received: from localhost ([127.0.0.1]:34569 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1mavf0-0007mt-NA
for submit <at> debbugs.gnu.org; Thu, 14 Oct 2021 04:00:18 -0400
Received: from mail-ed1-f43.google.com ([209.85.208.43]:36425)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <eller.helmut@HIDDEN>) id 1mavew-0007mY-G5
for 51177 <at> debbugs.gnu.org; Thu, 14 Oct 2021 04:00:17 -0400
Received: by mail-ed1-f43.google.com with SMTP id d3so20618795edp.3
for <51177 <at> debbugs.gnu.org>; Thu, 14 Oct 2021 01:00:14 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
h=from:to:cc:subject:references:date:in-reply-to:message-id
:user-agent:mime-version;
bh=9Vp1vzA9W+wxvxK376fcb5Zx7GxA+/JdDmptcjJS/p8=;
b=hI7VwRZtTYhA5SQ3DFFFUqUxhqqBEBvql7pWbOwbGsiWe8jY4phmXTh6UCGcAUMTdY
d888MlcR+0AmKzdVLAsaQqEr05wu2VdOcMTQh9NoN6MUFP1VIfLm2nb/Eq0lx6qugp1z
42LLd3yIVk6dwjTkTUuY7xbSrP79inMaW9K0Mz9/ADMvORT9ZWYWDSmS0Vd3ycOyfzfA
ma3pUq6e2vN5k8/UIlxOteiRvJXMxRFmBP+hYNjaTi4IM1Q0T1yNapSpeCPX/xHMXf7c
3E3vgLu89foBigH602+t0gdUC6Vw92mFRvKMWvO0c+hJgoI5E3Y/sjd2LTq7bEY8nI5Z
VI0A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20210112;
h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to
:message-id:user-agent:mime-version;
bh=9Vp1vzA9W+wxvxK376fcb5Zx7GxA+/JdDmptcjJS/p8=;
b=I/K/hANZernKt0AMCEBpFxbe7ncF5vRg5ZkP8MUqFAHBobKO0JslRju0+j0HftFAmK
jyz2U+lwl5JYKt463V0K1QwAoD8X5TitIdeCjoJmRfdRbVNxAdaKlXn7aO+rDvI47E60
ZUyoyNd3Yw3FNYjXQ0Ob3eXotPAW/4EXAyGPse0OGL1P/aNmu5oyCp8mojjH3dvRaMfw
rfN7kmuvtvkFemnGntiVLcoLt1cW8tDk0fsYJWTDMwGpjzDLgKzPUva79BeUKszr6j7S
VaOq7q+lsaVHggpXXjln/ForvhawnSrRm0QxN2yTG3zOdYXfDjpGDa84t3eANSYZH0LP
WdyQ==
X-Gm-Message-State: AOAM531m94Kb9banF4bbHV21cXsHJQ8kyI4lOQbFrMUNpRHMn6q/ndk5
UPKrU3SiPeqdsFWwS70dXdMMP4qpnlo=
X-Google-Smtp-Source: ABdhPJw7WiXqMN+12Lu2VnkII9r8nM7qYoZPkyb4qRunQQL25W5n+P9igYytQjgmsz+RELccTgileA==
X-Received: by 2002:a17:907:1119:: with SMTP id
qu25mr1983629ejb.245.1634198407850;
Thu, 14 Oct 2021 01:00:07 -0700 (PDT)
Received: from caladan ([31.177.113.240])
by smtp.gmail.com with ESMTPSA id y4sm1344636ejw.3.2021.10.14.01.00.06
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Thu, 14 Oct 2021 01:00:07 -0700 (PDT)
From: Helmut Eller <eller.helmut@HIDDEN>
References: <m2y26xqo1q.fsf@HIDDEN> <83r1cpnknc.fsf@HIDDEN>
<m2h7dlggwt.fsf@HIDDEN> <87v920cada.fsf@miha-pc>
Date: Thu, 14 Oct 2021 10:00:06 +0200
In-Reply-To: <87v920cada.fsf@miha-pc> (jakanakaevangeli@HIDDEN's message of
"Thu, 14 Oct 2021 09:51:29 +0200")
Message-ID: <m2wnmggho9.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
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 Thu, Oct 14 2021, jakanakaevangeli@HIDDEN wrote:
> I haven't read you request and patch in detail, but have you tried
> "(set-process-filter proc t)"? Looking at the doc string of
> set-process-filter and reading its code suggests that this may be what
> you want.
Indeed, this does exactly what I want. Thank you!
I did not read the docstring but I did read the manual. This feature is
not described in the manual. At least not near set-process-filter.
Helmut
X-Loop: help-debbugs@HIDDEN
Subject: bug#51177: 29.0.50; stop-process on pipes
Resent-From: Lars Ingebrigtsen <larsi@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Thu, 14 Oct 2021 11:11:01 +0000
Resent-Message-ID: <handler.51177.B51177.163420984316442 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 51177
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords:
To: Helmut Eller <eller.helmut@HIDDEN>
Cc: 51177 <at> debbugs.gnu.org, jakanakaevangeli@HIDDEN
Received: via spool by 51177-submit <at> debbugs.gnu.org id=B51177.163420984316442
(code B ref 51177); Thu, 14 Oct 2021 11:11:01 +0000
Received: (at 51177) by debbugs.gnu.org; 14 Oct 2021 11:10:43 +0000
Received: from localhost ([127.0.0.1]:34795 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1maydH-0004H8-DF
for submit <at> debbugs.gnu.org; Thu, 14 Oct 2021 07:10:43 -0400
Received: from quimby.gnus.org ([95.216.78.240]:34664)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <larsi@HIDDEN>) id 1maydE-0004Gr-Oy
for 51177 <at> debbugs.gnu.org; Thu, 14 Oct 2021 07:10:41 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
List-Subscribe:List-Post:List-Owner:List-Archive;
bh=gn7PL/PDeC3saX/RypMdy2rFxk1oWs5I9FR6pDsUnSs=; b=R4B1RIQ5tt9+fjADPdG6PQ7EZm
9Zdb6yIUdlCbnnn946mUkIMwzp0qx3jS5Rqt/+9bYTUmFJHa3P2ULoMgW1LH/qchJn225W33KQ8UA
4lgxHwsalLf8TwLsPwe5ndEfpMev6CjQch7pbnuUNvQZE7GUYuZuVpwkI9S6+5Prk/o0=;
Received: from [84.212.220.105] (helo=elva)
by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.92) (envelope-from <larsi@HIDDEN>)
id 1mayd6-0001DW-1r; Thu, 14 Oct 2021 13:10:34 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
References: <m2y26xqo1q.fsf@HIDDEN> <83r1cpnknc.fsf@HIDDEN>
<m2h7dlggwt.fsf@HIDDEN> <87v920cada.fsf@miha-pc>
<m2wnmggho9.fsf@HIDDEN>
Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj
SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAFVBMVEWho6DUyrt0gohV
XV+olnBEQT7///+p9vhSAAAAAWJLR0QGYWa4fQAAAAd0SU1FB+UKDgsKCNhTwFoAAAGnSURBVDjL
dZNdcuQgDISFwwGg4gNQePKeMeGd2WgvEJb7XyUtgX9ma9zlKdv9qYUY20SQfyHxzQUwV4mXAf96
AQXmClyMRfESTDH+387hINgUnoEjTSgwZNxTwlOYQkCrPoRs1jknW96mcoOQN05+ZhR6XLlx5U2f
KsQ4GUOH+iS0YHXMS0HNoGdrmWiKEx2LE24Cc/zDGDdOoTtnKZC/BfuHQqQQgkVGQQzkOkDJksKy
pJRkcSGxS7sS98SqAAVSueJY4g1gSUdiTdKkCyBpcwVLFC92sKZ1JNJZkhjgaJNaa6QXK4InP9Wm
CURw2kDLDYkOkNhqM8yaMlp1EEbrJF7NssZbB8JxL4266K1WeB1UabSDtO8pt5zyAbBWq2vu0x8i
WaylNddnv5Ley4Ay5xmEZcyfK8as5ePT+78K9qc8Fft99/P94d9b+zeAoWKN5WJZlQA+e70t9sG2
zIY9zw+Hyq8B4HJhxATIm/jFA8BmgHkDP8wDiOzDGuYNqLOfSIGjn8ibbIJbvAY81Vt3b1J+fNsz
ycPBK6ew7J+VE6DCP39G9vsX5xyaMdBJZq0AAAAldEVYdGRhdGU6Y3JlYXRlADIwMjEtMTAtMTRU
MTE6MTA6MDgrMDA6MDCfvBfkAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIxLTEwLTE0VDExOjEwOjA4
KzAwOjAw7uGvWAAAAABJRU5ErkJggg==
X-Now-Playing: Hood's _Field Report_: "Field Report a) i An Overcast Sky
Part 2"
Date: Thu, 14 Oct 2021 13:10:31 +0200
In-Reply-To: <m2wnmggho9.fsf@HIDDEN> (Helmut Eller's message of "Thu, 14
Oct 2021 10:00:06 +0200")
Message-ID: <87o87rzwt4.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
has NOT identified this incoming email as spam. The original
message has been attached to this so you can view it or label
similar future email. If you have any questions, see
@@CONTACT_ADDRESS@@ for details.
Content preview: Helmut Eller <eller.helmut@HIDDEN> writes: > I did not
read the docstring but I did read the manual. This feature is > not described
in the manual. At least not near set-process-filter. Yup. I've now documented
the t value in the manual in emacs-28.
Content analysis details: (-2.9 points, 5.0 required)
pts rule name description
---- ---------------------- --------------------------------------------------
-1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP
-1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
[score: 0.0000]
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 (---)
Helmut Eller <eller.helmut@HIDDEN> writes:
> I did not read the docstring but I did read the manual. This feature is
> not described in the manual. At least not near set-process-filter.
Yup. I've now documented the t value in the manual in emacs-28.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
X-Loop: help-debbugs@HIDDEN
Subject: bug#51177: 29.0.50; stop-process on pipes
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: Sat, 16 Oct 2021 16:25:01 +0000
Resent-Message-ID: <handler.51177.B51177.163440145629608 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 51177
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords:
To: Lars Ingebrigtsen <larsi@HIDDEN>
Cc: 51177 <at> debbugs.gnu.org, jakanakaevangeli@HIDDEN
Received: via spool by 51177-submit <at> debbugs.gnu.org id=B51177.163440145629608
(code B ref 51177); Sat, 16 Oct 2021 16:25:01 +0000
Received: (at 51177) by debbugs.gnu.org; 16 Oct 2021 16:24:16 +0000
Received: from localhost ([127.0.0.1]:42888 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1mbmTo-0007hU-10
for submit <at> debbugs.gnu.org; Sat, 16 Oct 2021 12:24:16 -0400
Received: from mail-ed1-f54.google.com ([209.85.208.54]:33460)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <eller.helmut@HIDDEN>) id 1mbmTi-0007hC-Pr
for 51177 <at> debbugs.gnu.org; Sat, 16 Oct 2021 12:24:14 -0400
Received: by mail-ed1-f54.google.com with SMTP id y30so33421798edi.0
for <51177 <at> debbugs.gnu.org>; Sat, 16 Oct 2021 09:24:10 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
h=from:to:cc:subject:references:date:in-reply-to:message-id
:user-agent:mime-version:content-transfer-encoding;
bh=V80EKo7+UZWQ2N5JB+7mT10/34nA+wXtXCCLxXzaNRk=;
b=onyL7lWjlRxbQpuj6eIax5PBSyOn+bqbUAhKtiPJ62mbq4UGQN1rVHyA4GrvgqhBRo
egkqR/2XtNXld8zW2YT1erlC9YnufLBnUHgurdVia/eeFgJeYMi70EMJmUAM1AJEVMMh
Oaxr/UyPy4XRoj8387h7zFqe1Y4kQPoLAFO4cnKlYjPNrppPGIxA4MtcFzn/FPsmh0II
IjKS7vvs4g71NAJ0Tqe26FnOT3Y2Mez302RAFrVfrNjY3I+lv53tI5NdiqcA3ovSKcRx
cCI/dV1rPIAx9jtOOHmgAbZGih2OM2ouB1Ta3PR39P99tcfvYhORG6P0J4zpVE+8u9Wj
BqoQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20210112;
h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to
:message-id:user-agent:mime-version:content-transfer-encoding;
bh=V80EKo7+UZWQ2N5JB+7mT10/34nA+wXtXCCLxXzaNRk=;
b=eTnb3usFhx7sh/5loiheERzbwDtVw1ncUq82zijzfPPOe2kQK+hGF8LTxAFmYudp2S
67dYgrYg7IUTq31gJpZ5Nu11EESAvX4u09AdHOXkH/q5Vzk7DfQjN0bCc6EIkmO0o23E
bI9I+mjFYR8iOgKsocgc8aVWBKf/k7pKX26pWTskGmJzBm9o5clpULv9dymOF38NNJjc
VvQBSC9XSaLdq6XdNzmC5LEXKhXOdNsanPwISSqQzPbGWVblxCnd3WKN8Sgn7Z5OOfnQ
2cCB00NAzEHovyW/YIHrSQtUuaWUrGDoRdfgWv2bcK3UBvFQ4+xzGsceIquAh8IV+p3i
7Lqw==
X-Gm-Message-State: AOAM531xvSWAQMzb6IEecesv2+zdAyb8BBTxkpZa0pXE2wm8N4/3sxHx
wDqYLEvKoTXSqbiknCPpPlQpMRJWrfs=
X-Google-Smtp-Source: ABdhPJzpXJytBeSW32ZE82wn6nIsRP5lWXlAT5STYgpRDtY0oZRWgKopCovoQ1o8rSlU4oMWZobGcA==
X-Received: by 2002:a17:907:16aa:: with SMTP id
hc42mr11984269ejc.39.1634401444882;
Sat, 16 Oct 2021 09:24:04 -0700 (PDT)
Received: from caladan ([89.107.104.255])
by smtp.gmail.com with ESMTPSA id y19sm7781498edd.39.2021.10.16.09.24.03
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Sat, 16 Oct 2021 09:24:04 -0700 (PDT)
From: Helmut Eller <eller.helmut@HIDDEN>
References: <m2y26xqo1q.fsf@HIDDEN> <83r1cpnknc.fsf@HIDDEN>
<m2h7dlggwt.fsf@HIDDEN> <87v920cada.fsf@miha-pc>
<m2wnmggho9.fsf@HIDDEN> <87o87rzwt4.fsf@HIDDEN>
Date: Sat, 16 Oct 2021 18:24:02 +0200
In-Reply-To: <87o87rzwt4.fsf@HIDDEN> (Lars Ingebrigtsen's message of "Thu,
14 Oct 2021 13:10:31 +0200")
Message-ID: <m2fst1aqfx.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
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 Thu, Oct 14 2021, Lars Ingebrigtsen wrote:
> Helmut Eller <eller.helmut@HIDDEN> writes:
>
>> I did not read the docstring but I did read the manual. This feature is
>> not described in the manual. At least not near set-process-filter.
>
> Yup. I've now documented the t value in the manual in emacs-28.
The t value also doesn't seem be handled correctly by make-process:
(ert-deftest test-filter=3Dt ()
(let ((p (make-process :command '("dd" "if=3D/dev/zero" "count=3D0")
:name "foo"
:filter t)))
;;(set-process-filter p t)
(while (eq (process-status p) 'run)
(accept-process-output p))))
when executed with
emacs -Q --batch -l test.el -f ert-run-tests-batch-and-exit
produces:
Running 1 tests (2021-10-16 18:21:53+0200, selector =E2=80=98t=E2=80=99)
Test test-filter=3Dt backtrace:
t(#<process foo> "0+0 records in\n0+0 records out\n")
accept-process-output(#<process foo>)
(while (eq (process-status p) 'run) (accept-process-output p))
(let ((p (make-process :command '("dd" "if=3D/dev/zero" "count=3D0") :na
(lambda nil (let ((p (make-process :command '("dd" "if=3D/dev/zero" "c
ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test
ert-run-test(#s(ert-test :name test-filter=3Dt :documentation nil :bod
ert-run-or-rerun-test(#s(ert--stats :selector t :tests [#s(ert-test=20
ert-run-tests(t #f(compiled-function (event-type &rest event-args) #
ert-run-tests-batch(nil)
ert-run-tests-batch-and-exit()
command-line-1(("-l" "test.el" "-f" "ert-run-tests-batch-and-exit"))
command-line()
normal-top-level()
Test test-filter=3Dt condition:
(void-function t)
FAILED 1/1 test-filter=3Dt (0.001650 sec)
Ran 1 tests, 0 results as expected, 1 unexpected (2021-10-16 18:21:53+0200,=
0.115393 sec)
1 unexpected results:
FAILED test-filter=3Dt
Helmut
X-Loop: help-debbugs@HIDDEN
Subject: bug#51177: 29.0.50; stop-process on pipes
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, 16 Oct 2021 16:48:01 +0000
Resent-Message-ID: <handler.51177.B51177.163440285831865 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 51177
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords:
To: Helmut Eller <eller.helmut@HIDDEN>
Cc: larsi@HIDDEN, 51177 <at> debbugs.gnu.org, jakanakaevangeli@HIDDEN
Received: via spool by 51177-submit <at> debbugs.gnu.org id=B51177.163440285831865
(code B ref 51177); Sat, 16 Oct 2021 16:48:01 +0000
Received: (at 51177) by debbugs.gnu.org; 16 Oct 2021 16:47:38 +0000
Received: from localhost ([127.0.0.1]:42920 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1mbmqQ-0008Hr-Bo
for submit <at> debbugs.gnu.org; Sat, 16 Oct 2021 12:47:38 -0400
Received: from eggs.gnu.org ([209.51.188.92]:54660)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <eliz@HIDDEN>) id 1mbmqO-0008H1-IK
for 51177 <at> debbugs.gnu.org; Sat, 16 Oct 2021 12:47:36 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:52706)
by eggs.gnu.org with esmtp (Exim 4.90_1)
(envelope-from <eliz@HIDDEN>)
id 1mbmqI-0002ae-A8; Sat, 16 Oct 2021 12:47:30 -0400
Received: from [87.69.77.57] (port=2031 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 1mbmqH-0002UI-TN; Sat, 16 Oct 2021 12:47:30 -0400
Date: Sat, 16 Oct 2021 19:47:31 +0300
Message-Id: <83fst0hq70.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
In-Reply-To: <m2fst1aqfx.fsf@HIDDEN> (message from Helmut Eller on Sat, 16
Oct 2021 18:24:02 +0200)
References: <m2y26xqo1q.fsf@HIDDEN> <83r1cpnknc.fsf@HIDDEN>
<m2h7dlggwt.fsf@HIDDEN> <87v920cada.fsf@miha-pc>
<m2wnmggho9.fsf@HIDDEN> <87o87rzwt4.fsf@HIDDEN>
<m2fst1aqfx.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: Helmut Eller <eller.helmut@HIDDEN>
> Date: Sat, 16 Oct 2021 18:24:02 +0200
> Cc: 51177 <at> debbugs.gnu.org, jakanakaevangeli@HIDDEN
>
> On Thu, Oct 14 2021, Lars Ingebrigtsen wrote:
>
> > Helmut Eller <eller.helmut@HIDDEN> writes:
> >
> >> I did not read the docstring but I did read the manual. This feature is
> >> not described in the manual. At least not near set-process-filter.
> >
> > Yup. I've now documented the t value in the manual in emacs-28.
>
> The t value also doesn't seem be handled correctly by make-process:
>
> (ert-deftest test-filter=t ()
> (let ((p (make-process :command '("dd" "if=/dev/zero" "count=0")
> :name "foo"
> :filter t)))
> ;;(set-process-filter p t)
> (while (eq (process-status p) 'run)
> (accept-process-output p))))
>
> when executed with
>
> emacs -Q --batch -l test.el -f ert-run-tests-batch-and-exit
>
> produces:
>
> Running 1 tests (2021-10-16 18:21:53+0200, selector âtâ)
> Test test-filter=t backtrace:
> t(#<process foo> "0+0 records in\n0+0 records out\n")
> accept-process-output(#<process foo>)
What do we expect to happen when a Lisp program calls
accept-process-output on a process that is stopped?
X-Loop: help-debbugs@HIDDEN
Subject: bug#51177: 29.0.50; stop-process on pipes
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: Sat, 16 Oct 2021 17:08:02 +0000
Resent-Message-ID: <handler.51177.B51177.16344040709912 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 51177
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords:
To: Eli Zaretskii <eliz@HIDDEN>
Cc: larsi@HIDDEN, 51177 <at> debbugs.gnu.org, jakanakaevangeli@HIDDEN
Received: via spool by 51177-submit <at> debbugs.gnu.org id=B51177.16344040709912
(code B ref 51177); Sat, 16 Oct 2021 17:08:02 +0000
Received: (at 51177) by debbugs.gnu.org; 16 Oct 2021 17:07:50 +0000
Received: from localhost ([127.0.0.1]:42969 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1mbn9y-0002Zn-MA
for submit <at> debbugs.gnu.org; Sat, 16 Oct 2021 13:07:50 -0400
Received: from mail-ed1-f54.google.com ([209.85.208.54]:35551)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <eller.helmut@HIDDEN>) id 1mbn9u-0002ZQ-1M
for 51177 <at> debbugs.gnu.org; Sat, 16 Oct 2021 13:07:49 -0400
Received: by mail-ed1-f54.google.com with SMTP id w19so51201038edd.2
for <51177 <at> debbugs.gnu.org>; Sat, 16 Oct 2021 10:07:46 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
h=from:to:cc:subject:references:date:in-reply-to:message-id
:user-agent:mime-version:content-transfer-encoding;
bh=C4wbpvXg6tSwOSuuu+HcgDwSD0AE1BlEirsSrYTgQdA=;
b=nfYUB5cxuxJlEXcrDbYIUBzdssEI6EFWY581KNzFCkwICy4J+0m2Pu+Bi4CO/75DVJ
kqiIUm/cF6EgEXuY8jAMfVGZlbYmV5iwx8OMUUhpiS1+Pqm+hJFqxd33MnAlbcMb9I6z
h+JLTAQsLQE6Oasxwq4wlX4Jd4zDOqgVC/MPO7g0+dvCXFtIawgTy0j3UGbLhYEDoQ9Q
3udM0PiwhSjOpWO/Z/tgsdZuJfa0Z0GZEzYtDtkFUXiaEs3Iy9110vcZRv9835psL3am
vQ6xxc/aaklpLWNqpB6cPj88wer6VUaK4OeBvJtZfE1YfGh34zsls2aVz1ZlWCK2zkjY
5Nrw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20210112;
h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to
:message-id:user-agent:mime-version:content-transfer-encoding;
bh=C4wbpvXg6tSwOSuuu+HcgDwSD0AE1BlEirsSrYTgQdA=;
b=yMpSXNqUY+z7NlgIamrelcWam/KUfBJ2noCvzdMDTeMkBweEo5TbMY1YDBLHFaEvf6
faw+0j2yrsOdgQsU4R9O+ghw02Jr+CCpCaXvnNVvlHyCxKjqmxukt5e0P3A9ggdQv77i
/RLxl3lkkuBTpYxFjyudhAvP/uGGhnKeES+TlG0F2vCVZLt08mMCaRQLlWPb0HtXy3nG
GE1z7zWIazxR5SRlJT+2isgb2vdEP/zHLC9lRAb6UT64qsIGV1MXtVNzAerXKDfI+ANc
WsjhwlOwYwAVo2IQWMNF7hUT1gy1VD7R5BPy/xP0w39pglA7MlkaTdC1AKk0BgOBy9eP
3QXw==
X-Gm-Message-State: AOAM532nyYDsHE5lPaOW3WMYy8WoSLqPyAaKK5J1/8ODGS8NGADqtqOB
VxaU/bgvAMgcTxNQRFBuk7k=
X-Google-Smtp-Source: ABdhPJxwlsBTFYfZQZBmkjn6aaiqqMPnZFrrFgUy+I1OUqN7CgRnnTOf65AywhEOWU7LFzRTsLYGLA==
X-Received: by 2002:a17:906:3411:: with SMTP id
c17mr16145018ejb.290.1634404059175;
Sat, 16 Oct 2021 10:07:39 -0700 (PDT)
Received: from caladan ([89.107.104.255])
by smtp.gmail.com with ESMTPSA id f7sm7220284edl.33.2021.10.16.10.07.38
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Sat, 16 Oct 2021 10:07:38 -0700 (PDT)
From: Helmut Eller <eller.helmut@HIDDEN>
References: <m2y26xqo1q.fsf@HIDDEN> <83r1cpnknc.fsf@HIDDEN>
<m2h7dlggwt.fsf@HIDDEN> <87v920cada.fsf@miha-pc>
<m2wnmggho9.fsf@HIDDEN> <87o87rzwt4.fsf@HIDDEN>
<m2fst1aqfx.fsf@HIDDEN> <83fst0hq70.fsf@HIDDEN>
Date: Sat, 16 Oct 2021 19:07:37 +0200
In-Reply-To: <83fst0hq70.fsf@HIDDEN> (Eli Zaretskii's message of "Sat, 16 Oct
2021 19:47:31 +0300")
Message-ID: <m2tuhgaofa.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
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, Oct 16 2021, Eli Zaretskii wrote:
>> Running 1 tests (2021-10-16 18:21:53+0200, selector =E2=80=98t=E2=80=99)
>> Test test-filter=3Dt backtrace:
>> t(#<process foo> "0+0 records in\n0+0 records out\n")
>> accept-process-output(#<process foo>)
>
> What do we expect to happen when a Lisp program calls
> accept-process-output on a process that is stopped?
I would not expect that the symbol t will be called.
I would expect that accept-process-output on a process initialized with
(make-process ... :filter t)
and
(set-process-filter (make-process ...) t)
does the same.
I would expect that accept-process-output checks and maybe updates the
process-status. If the process-status hasn't changed, then the return
value of accept-process-output should be nil.
Helmut
X-Loop: help-debbugs@HIDDEN
Subject: bug#51177: 29.0.50; stop-process on pipes
Resent-From: Lars Ingebrigtsen <larsi@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Mon, 18 Oct 2021 07:00:02 +0000
Resent-Message-ID: <handler.51177.B51177.163454034717701 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 51177
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords:
To: Helmut Eller <eller.helmut@HIDDEN>
Cc: Eli Zaretskii <eliz@HIDDEN>, 51177 <at> debbugs.gnu.org, jakanakaevangeli@HIDDEN
Received: via spool by 51177-submit <at> debbugs.gnu.org id=B51177.163454034717701
(code B ref 51177); Mon, 18 Oct 2021 07:00:02 +0000
Received: (at 51177) by debbugs.gnu.org; 18 Oct 2021 06:59:07 +0000
Received: from localhost ([127.0.0.1]:45670 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1mcMby-0004bR-WC
for submit <at> debbugs.gnu.org; Mon, 18 Oct 2021 02:59:07 -0400
Received: from quimby.gnus.org ([95.216.78.240]:48398)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <larsi@HIDDEN>) id 1mcMbx-0004av-CS
for 51177 <at> debbugs.gnu.org; Mon, 18 Oct 2021 02:59:06 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
List-Subscribe:List-Post:List-Owner:List-Archive;
bh=NUWcZjzjqelSkCjzphmkStjy+GPyxZLnV4avQEjZU2o=; b=YhuALbzrTRietTx0wL3gPFf7Ss
x+TMNT/Di2YOOXniysDP3/Jy2DVqrjIQ4r4Og78Lwnt0xsXdPDZj1Dzd0PRpCLo/rpKLaMaFP0xFy
rfzJSAbsBEquGMCAN9CEgmVIqtODG+Kd51g7iix4RNfKJ+PoswXb3UY4eYIq2J+or3vc=;
Received: from [84.212.220.105] (helo=elva)
by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.92) (envelope-from <larsi@HIDDEN>)
id 1mcMbo-0000GN-8B; Mon, 18 Oct 2021 08:58:58 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
References: <m2y26xqo1q.fsf@HIDDEN> <83r1cpnknc.fsf@HIDDEN>
<m2h7dlggwt.fsf@HIDDEN> <87v920cada.fsf@miha-pc>
<m2wnmggho9.fsf@HIDDEN> <87o87rzwt4.fsf@HIDDEN>
<m2fst1aqfx.fsf@HIDDEN> <83fst0hq70.fsf@HIDDEN>
<m2tuhgaofa.fsf@HIDDEN>
Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj
SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAIVBMVEXi4d5/gX7DvryZ
kY8TExFzamoxLS5YUVJDQDuEenr///+gyxzkAAAAAWJLR0QKaND0VgAAAAd0SU1FB+UKEgYpNFuC
sMgAAAGdSURBVDjLdZNLTsMwEIaH9AgI2FapKrYgU1D2xqwRMiFLJGNygLbOAcD1FkVZ+LaMH3HS
Jv0jRfF8/zxiywBRF7DCF03q47CGS8g3YgpW+Q7WTzqGRQ+yu83mFx5l72cigoVRn4eFSZVkBNmH
lF/qlm0pO+mRX1Oqb2rRFxqaP8haGy2oRyxlLD6k+W6GFglk+V4Ko41gP35WTArx13IvqJQ1a+Rx
xjt2FmIYKYHVRjCmGZPbAWSekC19vqoFex9AnufYRAn6so2DDiDDZ0VO5IBPmiiA5SiyzLx1PmGZ
wYn9qBScActzYD4OZ/y4GWQmBwcGtw+yPvCK/5E3wtt7y1UjGXVASqWqruQoZYwJRwK0VnxQZdui
K90RwsEopz5uW0J42WgKyepjQQXnJQR31R5vuuUIdgja0+MoYFciqMIKOVbpvC2AlNHhNykssRZC
56G4n6FIIE5krVsi5BZUmtbabvSrcaqpQKnRn5fOtcOHqx5MBMZJHaag1rXppRqTHCCjRtwrgV6+
gp4BUSYc7YwgXOxzwN0YXIhR8j/lcioMhqyxAgAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMS0xMC0x
OFQwNjo0MTo1MiswMDowMKrntVQAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjEtMTAtMThUMDY6NDE6
NTIrMDA6MDDbug3oAAAAAElFTkSuQmCC
X-Now-Playing: Brokeback's _Illinois River Valley Blues_: "Spanish Venus"
Date: Mon, 18 Oct 2021 08:58:55 +0200
In-Reply-To: <m2tuhgaofa.fsf@HIDDEN> (Helmut Eller's message of "Sat, 16
Oct 2021 19:07:37 +0200")
Message-ID: <87bl3mom34.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
has NOT identified this incoming email as spam. The original
message has been attached to this so you can view it or label
similar future email. If you have any questions, see
@@CONTACT_ADDRESS@@ for details.
Content preview: Helmut Eller <eller.helmut@HIDDEN> writes: > I would
expect
that accept-process-output on a process initialized with > > (make-process
... :filter t) > > and > > (set-process-filter (make-process ...) t) > >
does the same.
Content analysis details: (-2.9 points, 5.0 required)
pts rule name description
---- ---------------------- --------------------------------------------------
-1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP
-1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
[score: 0.0000]
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 (---)
Helmut Eller <eller.helmut@HIDDEN> writes:
> I would expect that accept-process-output on a process initialized with
>
> (make-process ... :filter t)
>
> and
>
> (set-process-filter (make-process ...) t)
>
> does the same.
Yes, I think that makes sense. And there was some support for it
already, but not in all the code paths. I've adjusted this in Emacs 29
now.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
X-Loop: help-debbugs@HIDDEN
Subject: bug#51177: 29.0.50; stop-process on pipes
References: <m2y26xqo1q.fsf@HIDDEN>
In-Reply-To: <m2y26xqo1q.fsf@HIDDEN>
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: Thu, 11 Nov 2021 19:49:02 +0000
Resent-Message-ID: <handler.51177.B51177.16366600878458 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 51177
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords:
To: Lars Ingebrigtsen <larsi@HIDDEN>
Cc: 51177 <at> debbugs.gnu.org
Received: via spool by 51177-submit <at> debbugs.gnu.org id=B51177.16366600878458
(code B ref 51177); Thu, 11 Nov 2021 19:49:02 +0000
Received: (at 51177) by debbugs.gnu.org; 11 Nov 2021 19:48:07 +0000
Received: from localhost ([127.0.0.1]:42371 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1mlG3L-0002CM-GP
for submit <at> debbugs.gnu.org; Thu, 11 Nov 2021 14:48:07 -0500
Received: from mail-wr1-f54.google.com ([209.85.221.54]:40603)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <eller.helmut@HIDDEN>) id 1mlG3J-0002Bp-1p
for 51177 <at> debbugs.gnu.org; Thu, 11 Nov 2021 14:48:06 -0500
Received: by mail-wr1-f54.google.com with SMTP id r8so11592588wra.7
for <51177 <at> debbugs.gnu.org>; Thu, 11 Nov 2021 11:48:04 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
h=from:to:cc:subject:date:message-id:user-agent:mime-version;
bh=j80JVgGvixyTmTTzAQ2BJybva0tS5z+8pHuDMwHU6wo=;
b=ZlzSwDzjtuuPU1+3XvDYAp6uwAajxXIKU1irvxjvd/fBiwiMlAGX8MCEw5e5cOhxln
g73UvDqTo8OAzZAgZ6lsXfrRqCMiULbHIrUI6L/G20kEKmb9Tc64B31Hch1msKBivlMC
SSkipu7MTIIHYxyhksFFBFdHLR41DDuWiqJpr2lOD1j8NTHm5N3i02vSWf6yUBxlSncx
IjVdCdxESofyoD4VQ89itXu+w8zjqFHZpoQFB1vMVMjWgocTSSImYKK3sTd+bwq6HtlI
aNV855AoSOVKpKe5FPxRHHUgy5IquyuB+cscstUSQO3tI4fc5LgwVYlFvIKjAsqN5FUV
UuTg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20210112;
h=x-gm-message-state:from:to:cc:subject:date:message-id:user-agent
:mime-version;
bh=j80JVgGvixyTmTTzAQ2BJybva0tS5z+8pHuDMwHU6wo=;
b=TJInB8tk0s8MGXo9JgM2Q8FdyxY9xeteNnkz9SjVAOb4UrNakMCQ9bOrXs9g94K5xa
Qts5Ba9L1IcZFs3u1r091FkA+urYtk0s0AgdmeQ6dA4Ccjwt5pO+VEipRe9s+S/HArhg
OnMMNaMyIMMEfCn5RWGYm9+BU+n5lveHsNuuCIc2TJPvgUgypYO3H56K6wpVWRUs5QQP
ZYDmo5jP/N2PvxbWd8dgG151F9XMf/TTiMiDgrrfoXD610zhbIl7sdUis4AzwFCZvok9
sTGtz4XKLCjsBepdJmjBZsaHRzo4YBT5ZvTMA8dtQnhVRGpY+miaVdQJTi8Byn7C8RJu
w+fg==
X-Gm-Message-State: AOAM532GfHt9r5fh9kccJVbbykEtfbmLkgvFnARN99hTmpZAFYk6x+Jj
FKArGlveYQfGAtGiz+zZ5+ZrPeAZaUI=
X-Google-Smtp-Source: ABdhPJzPA1ID6ZghaN+yH3+LnaeC8Yp9Ca7hy0hBpZBfSvH6xT+qChkq3NjuM4wQxyqGFfoyftszRQ==
X-Received: by 2002:a5d:4a44:: with SMTP id v4mr11854985wrs.246.1636660079161;
Thu, 11 Nov 2021 11:47:59 -0800 (PST)
Received: from caladan ([31.177.117.48])
by smtp.gmail.com with ESMTPSA id u5sm3913566wrg.57.2021.11.11.11.47.58
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Thu, 11 Nov 2021 11:47:58 -0800 (PST)
From: Helmut Eller <eller.helmut@HIDDEN>
Date: Thu, 11 Nov 2021 20:47:57 +0100
Message-ID: <m2bl2qa2z6.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
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 (-)
I have another problem with stopped output. In this example:
;;; -*- lexical-binding:t -*-
(ert-deftest test-read-after-exit ()
(let* ((output "")
(filter (lambda (p s) (setq output (concat output s))))
(sentinel (lambda (p _)
(set-process-filter p filter)
(while (accept-process-output p 0))))
(proc (make-process :command '("printf" "foo")
:name "test-proc"
:filter t
:sentinel sentinel
:connection-type 'pipe)))
(while (process-live-p proc)
(accept-process-output proc 0.2))
(set-process-filter proc filter)
(while (accept-process-output proc 0))
(should (equal output "foo"))))
the filter function is never called.
We could say that reading the process's output after the process has
terminated is an unreasonable request. However, I would like to propose
that, in status_notify, the sentinel function should be called before
closing the file descriptors. That way, the sentinel can read the
buffered output as suggested in the example.
Helmut
X-Loop: help-debbugs@HIDDEN
Subject: bug#51177: 29.0.50; stop-process on pipes
Resent-From: Lars Ingebrigtsen <larsi@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Fri, 12 Nov 2021 03:36:01 +0000
Resent-Message-ID: <handler.51177.B51177.16366881406458 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 51177
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords:
To: Helmut Eller <eller.helmut@HIDDEN>
Cc: 51177 <at> debbugs.gnu.org
Received: via spool by 51177-submit <at> debbugs.gnu.org id=B51177.16366881406458
(code B ref 51177); Fri, 12 Nov 2021 03:36:01 +0000
Received: (at 51177) by debbugs.gnu.org; 12 Nov 2021 03:35:40 +0000
Received: from localhost ([127.0.0.1]:42795 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1mlNLn-0001g6-TC
for submit <at> debbugs.gnu.org; Thu, 11 Nov 2021 22:35:40 -0500
Received: from quimby.gnus.org ([95.216.78.240]:60522)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <larsi@HIDDEN>) id 1mlNLl-0001fs-NW
for 51177 <at> debbugs.gnu.org; Thu, 11 Nov 2021 22:35:38 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
List-Subscribe:List-Post:List-Owner:List-Archive;
bh=ngmfRtXk+r0nMl59Js6+w5T1YqdY3mDS2CAVAmHCKE0=; b=Ke3d6GBqgFiOQwff5Rs52lgxXu
fK6iRrNvIfDOJ7REg3wRr5+/yyShC82ukRz4i33UNwEVkkXfwz7+JcNZFsRuiq3Z97PF2rxqSeZ7T
wQkC+6TRj1/Uce44/yEqmm69WgLXGT2vNrPOEYjMEH/fxn7AZth1PRyc5/l8OXY4DV88=;
Received: from [84.212.220.105] (helo=xo)
by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.92) (envelope-from <larsi@HIDDEN>)
id 1mlNLd-0003fu-9W; Fri, 12 Nov 2021 04:35:32 +0100
From: Lars Ingebrigtsen <larsi@HIDDEN>
References: <m2bl2qa2z6.fsf@HIDDEN>
Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAABGdBTUEAALGPC/xhBQAAACBj
SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAADFBMVEXf399/foAkJCb/
//8aMSjyAAAAAWJLR0QDEQxM8gAAAAd0SU1FB+ULDAIxCQtexUAAAAGFSURBVCjPhZLNboJAFIUP
BIiykkRMOyvTaNLwFEOjXWMiprLqwiZ1noJ20TUuNCkr2ohh7lP2zmDTZWc13z2XOfcH4O+M4KzS
aOzH4zW8DL6XRojyKDOag+UCqQf4BQGrSEo4G6KcAxyMFR3z0uYVpNexqhu+k2YZ8zxeQyJzNhpI
sVpyPhKqK1z2Fy35E6JTh8vnyxMLLrWHOQ5EHZcTqBIusg86szJUC6eWMyQHhoHaK8IUQ+PptaKd
yGnfxFjevamSJFsCAkrrgCounz1vEv0aUGfuEIOwGrmkHiqGrX/LkaOyPrIQQGgrADb0KCEaZUHV
7yUmTULcCPank0bIQEb55gT3CgkdMziNsMAzyEeD54C4IhAbJJpteyCZkOm+tKCFhcpC5SvJ0PRp
CA2cLQDBmR/QV8XtemgL84xROtv6Hpgx7Mzy/C33H1Ar7bR2DL6qS2Eg4MX4okBid5chGwZLhBZ2
rKawSp7zapyvGWI7SLGAJ8cmKeZ53//+PixlI/xzfgA4zIj9xqxzCwAAACV0RVh0ZGF0ZTpjcmVh
dGUAMjAyMS0xMS0xMlQwMjo0OTowOSswMDowMBA//9wAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjEt
MTEtMTJUMDI6NDk6MDkrMDA6MDBhYkdgAAAAAElFTkSuQmCC
X-Now-Playing: Sonic Youth's _Goo_: "Titanium Expose"
Date: Fri, 12 Nov 2021 04:35:28 +0100
In-Reply-To: <m2bl2qa2z6.fsf@HIDDEN> (Helmut Eller's message of "Thu, 11
Nov 2021 20:47:57 +0100")
Message-ID: <87k0he2ghr.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
has NOT identified this incoming email as spam. The original
message has been attached to this so you can view it or label
similar future email. If you have any questions, see
@@CONTACT_ADDRESS@@ for details.
Content preview: Helmut Eller <eller.helmut@HIDDEN> writes: > We could say
that reading the process's output after the process has > terminated is an
unreasonable request. I'm not sure I quite understand -- all the output from
the process should be delivered (to the filter function) before Emacs marks
the process as terminated, I think?
Content analysis details: (-2.9 points, 5.0 required)
pts rule name description
---- ---------------------- --------------------------------------------------
-1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP
-1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
[score: 0.0000]
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 (---)
Helmut Eller <eller.helmut@HIDDEN> writes:
> We could say that reading the process's output after the process has
> terminated is an unreasonable request.
I'm not sure I quite understand -- all the output from the process
should be delivered (to the filter function) before Emacs marks the
process as terminated, I think?
> However, I would like to propose
> that, in status_notify, the sentinel function should be called before
> closing the file descriptors. That way, the sentinel can read the
> buffered output as suggested in the example.
A sentinel usually doesn't read anything...
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
X-Loop: help-debbugs@HIDDEN
Subject: bug#51177: 29.0.50; stop-process on pipes
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: Fri, 12 Nov 2021 05:14:01 +0000
Resent-Message-ID: <handler.51177.B51177.1636694033658 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 51177
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords:
To: Lars Ingebrigtsen <larsi@HIDDEN>
Cc: 51177 <at> debbugs.gnu.org
Received: via spool by 51177-submit <at> debbugs.gnu.org id=B51177.1636694033658
(code B ref 51177); Fri, 12 Nov 2021 05:14:01 +0000
Received: (at 51177) by debbugs.gnu.org; 12 Nov 2021 05:13:53 +0000
Received: from localhost ([127.0.0.1]:42887 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1mlOsq-0000AX-NI
for submit <at> debbugs.gnu.org; Fri, 12 Nov 2021 00:13:52 -0500
Received: from mail-wm1-f50.google.com ([209.85.128.50]:54152)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <eller.helmut@HIDDEN>) id 1mlOso-0000AJ-7D
for 51177 <at> debbugs.gnu.org; Fri, 12 Nov 2021 00:13:51 -0500
Received: by mail-wm1-f50.google.com with SMTP id y196so6749324wmc.3
for <51177 <at> debbugs.gnu.org>; Thu, 11 Nov 2021 21:13:50 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
h=from:to:cc:subject:references:date:in-reply-to:message-id
:user-agent:mime-version;
bh=r3/+SbaLK9Xm8K86y4vJOKvQGfH1jICNnldDeDZAfD4=;
b=HZy8WCfJ9TOQT6Wpw8q3t2z4rQ32KkoTuTKH313AgGNJICuhXawSa02L4vt5iLbD4D
NE9sjRjAqpv0dzO/5AiWqxwgsLLOhsMu+dak2FLp9UlLQ7G1bDXgvrrA8JzsbWuMqDjq
fzKpWBel98BSkrLk0PvT+mA+OrQiqSQAGjeQS8osx1r2ysFpgpwhWg5CDwrAXbeDyAw/
5tQ4oA+2nZwNibD7LIiV78YMOba6SfFz3XVslVf3T4qhpb6YaoxqqO/ijRDd3Rc1HRZH
HWIyq4xkvV/LR8kKaNtZ/flGqpGeSP+WHDhWq+9rx+i3wLUDoGlILcqJT+KIHt5+XFMG
nrjw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20210112;
h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to
:message-id:user-agent:mime-version;
bh=r3/+SbaLK9Xm8K86y4vJOKvQGfH1jICNnldDeDZAfD4=;
b=459UdITy13gDiZEqUl9T1TiaTxA9rtbm/F722vqLXqRgJVhj2lRzMHJwOBmSMGDXzZ
PDuQaEq5fyX8PjUgbUaxlKpmGZl41clwD9APY52mqfyWC2n8uS06e7rCO8AfxYg5g9Pp
TiMIM8aV7SdxyTjp+4Z446YMB0P9rvbSZSs/FXdlLrNAealHI1a9R061ClDjYFVQeOp4
oW7Q7MS2xr84XJxtjb9KlkkvX4sgKfUJGwAoJ9x401xfGykqSlkGQwfXUx6Rt+7e1DAK
+VN00BisH790YIJg/u9+neTjXm+PObExY5OJaDeSyicdg7Y0HykULYMFxnDGRqPJ6aoJ
riGQ==
X-Gm-Message-State: AOAM532UgFuR0F0kuMw+oUhttO3Yeuv1bP6VKTvB8/1MCJ2a64BlBowp
zRCAEvU8KQ/9daW89X8Q6e4HUxnv/t4=
X-Google-Smtp-Source: ABdhPJxIajvL9R01nRnmZLqVj9h6uHuX0ZJp//fkOfPd7RHIcJY6Q1pSnWZDFBsER4mIS1WlZClB/g==
X-Received: by 2002:a05:600c:1c1a:: with SMTP id
j26mr14456418wms.28.1636694024401;
Thu, 11 Nov 2021 21:13:44 -0800 (PST)
Received: from caladan ([31.177.117.48])
by smtp.gmail.com with ESMTPSA id n4sm5572144wri.41.2021.11.11.21.13.43
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Thu, 11 Nov 2021 21:13:43 -0800 (PST)
From: Helmut Eller <eller.helmut@HIDDEN>
References: <m2bl2qa2z6.fsf@HIDDEN> <87k0he2ghr.fsf@HIDDEN>
Date: Fri, 12 Nov 2021 06:13:42 +0100
In-Reply-To: <87k0he2ghr.fsf@HIDDEN> (Lars Ingebrigtsen's message of "Fri,
12 Nov 2021 04:35:28 +0100")
Message-ID: <m24k8iklbt.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
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 (-)
--=-=-=
Content-Type: text/plain
On Fri, Nov 12 2021, Lars Ingebrigtsen wrote:
>> However, I would like to propose
>> that, in status_notify, the sentinel function should be called before
>> closing the file descriptors. That way, the sentinel can read the
>> buffered output as suggested in the example.
>
> A sentinel usually doesn't read anything...
The idea is that the sentinel does something like this:
(lambda (p _)
(set-process-filter p filter)
(while (accept-process-output p 0)))
First, it changes the filter from t to an actual function. Then it
calls accept-process-output. This in turn polls the file descriptors
and calls the filter function if there is buffered output. If there is
no buffered output to read, then accept-process-output returns nil and
the while loop terminates.
All this happens after the process has terminated. Granted, not a
particularly intuitive API.
However, the required change would be rather small, I think. The patch
below shows how this could be done. It basically moves the part that
closes the file descriptors after the call to exec_sentinel.
--=-=-=
Content-Type: text/x-diff
Content-Disposition: inline; filename=sentinel.patch
diff --git a/src/process.c b/src/process.c
index f923aff1cb..bc236c7e4c 100644
--- a/src/process.c
+++ b/src/process.c
@@ -1341,6 +1341,9 @@ The string argument is normally a multibyte string, except:
&& !EQ (p->command, Qt))
add_process_read_fd (p->infd);
}
+ else {
+ fprintf (stderr, "p->infd < 0 in Fset_process_filter\n");
+ }
pset_filter (p, filter);
@@ -7536,15 +7539,6 @@ status_notify (struct Lisp_Process *deleting_process,
if (CONSP (p->status))
symbol = XCAR (p->status);
- if (EQ (symbol, Qsignal) || EQ (symbol, Qexit)
- || EQ (symbol, Qclosed))
- {
- if (delete_exited_processes)
- remove_process (proc);
- else
- deactivate_process (proc);
- }
-
/* The actions above may have further incremented p->tick.
So set p->update_tick again so that an error in the sentinel will
not cause this code to be run again. */
@@ -7554,6 +7548,16 @@ status_notify (struct Lisp_Process *deleting_process,
if (BUFFERP (p->buffer))
/* In case it uses %s in mode-line-format. */
bset_update_mode_line (XBUFFER (p->buffer));
+
+ if (EQ (symbol, Qsignal) || EQ (symbol, Qexit)
+ || EQ (symbol, Qclosed))
+ {
+ if (delete_exited_processes)
+ remove_process (proc);
+ else
+ deactivate_process (proc);
+ }
+
}
} /* end for */
--=-=-=--
X-Loop: help-debbugs@HIDDEN
Subject: bug#51177: 29.0.50; stop-process on pipes
Resent-From: Lars Ingebrigtsen <larsi@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Fri, 12 Nov 2021 06:32:02 +0000
Resent-Message-ID: <handler.51177.B51177.163669866622730 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 51177
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords:
To: Helmut Eller <eller.helmut@HIDDEN>
Cc: 51177 <at> debbugs.gnu.org
Received: via spool by 51177-submit <at> debbugs.gnu.org id=B51177.163669866622730
(code B ref 51177); Fri, 12 Nov 2021 06:32:02 +0000
Received: (at 51177) by debbugs.gnu.org; 12 Nov 2021 06:31:06 +0000
Received: from localhost ([127.0.0.1]:43149 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1mlQ5a-0005uL-HU
for submit <at> debbugs.gnu.org; Fri, 12 Nov 2021 01:31:06 -0500
Received: from quimby.gnus.org ([95.216.78.240]:33908)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <larsi@HIDDEN>) id 1mlQ5Y-0005nZ-EM
for 51177 <at> debbugs.gnu.org; Fri, 12 Nov 2021 01:31:04 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID
:In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To:Content-ID:
Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe:
List-Post:List-Owner:List-Archive;
bh=WBphUt1KIZqZZSE32u0tMK99PsBDe3vdIuShu9OuKyY=; b=Da5ytS3rvBquXlZ+pUdAeBLxOY
pDWVvgz6zs9VRon3xqVXoatNGAUsDAsNgZVcJNTOKCJT/mIVXvx5uOQDq1dNAsfECMYrWBaozUzLx
0iHRt974sPwItJNVz4vvxOB84CKgK754y3e8ppablKAd4V8Mkls6F2A8n2zPYlbMI5t0=;
Received: from [84.212.220.105] (helo=xo)
by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.92) (envelope-from <larsi@HIDDEN>)
id 1mlQ5K-0004sL-L8; Fri, 12 Nov 2021 07:30:53 +0100
From: Lars Ingebrigtsen <larsi@HIDDEN>
References: <m2bl2qa2z6.fsf@HIDDEN> <87k0he2ghr.fsf@HIDDEN>
<m24k8iklbt.fsf@HIDDEN>
Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj
SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAFVBMVEXs6+6YlH5FXpZB
P0Cpo7EZV6z///+9+7fYAAAAAWJLR0QGYWa4fQAAAAd0SU1FB+ULDAYHAPyXRE0AAAFISURBVDjL
tdK7doMwDAZgJYfsCOjOJezluNltIvbUoPd/lVo219Rs7T9wOPqwBNgAZ8kylUKhzTNXhck7g4TK
5RPyRqkOKUEBdFCgJIAiAqME8PkO+ukhK1wrSQq5q39pWaDIrShIQLm5df1gDStUcsG8S6Fl5nKD
HGWStBKwGzSkTRguwGUyQzYSkCuNM1htPkYHGXNdS4FfAXhyj4265zUL+FR8AvzHYMNrvYNtGpW3
ERhV05kYfMumXlewWV2380zJsMDoftTDQ3mEb0PYxuA1N44CnMIQICVKPQxHSCqsYqCB3G17gFsA
ANIrTHBZ4FJhUe7AYBVaJe7IHVYgDnZutZsx+RlTGwF3zPppWD6QN7hmdX8f5rV7SIhu91YOK9G8
tduMcr9nAayH9Dewh3sE9BmUkPQcAyu1GPj8F0znQGs07aJ/AK2OCyCelvJsAAAAJXRFWHRkYXRl
OmNyZWF0ZQAyMDIxLTExLTEyVDA2OjA3OjAwKzAwOjAw6w6TqAAAACV0RVh0ZGF0ZTptb2RpZnkA
MjAyMS0xMS0xMlQwNjowNzowMCswMDowMJpTKxQAAAAASUVORK5CYII=
X-Now-Playing: Sonic Youth's _Washing Machine_: "Untitled"
Date: Fri, 12 Nov 2021 07:30:45 +0100
In-Reply-To: <m24k8iklbt.fsf@HIDDEN> (Helmut Eller's message of "Fri, 12
Nov 2021 06:13:42 +0100")
Message-ID: <87sfw1sx62.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
has NOT identified this incoming email as spam. The original
message has been attached to this so you can view it or label
similar future email. If you have any questions, see
@@CONTACT_ADDRESS@@ for details.
Content preview: Helmut Eller <eller.helmut@HIDDEN> writes: > All this happens
after the process has terminated. Granted, not a > particularly intuitive
API. Ah, I see. No, that's not very intuitive. =?UTF-8?Q?=F0=9F=98=80?=
Content analysis details: (-2.9 points, 5.0 required)
pts rule name description
---- ---------------------- --------------------------------------------------
-1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP
-1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
[score: 0.0000]
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 (---)
Helmut Eller <eller.helmut@HIDDEN> writes:
> All this happens after the process has terminated. Granted, not a
> particularly intuitive API.
Ah, I see. No, that's not very intuitive. =F0=9F=98=80
As for the patch itself, I'd worry that a subtle change in semantics
here would break stuff (and this is an area that's full of notoriously
subtle things), but perhaps it's OK. Anybody have an opinion here?
--=20
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
X-Loop: help-debbugs@HIDDEN
Subject: bug#51177: 29.0.50; stop-process on pipes
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: Fri, 12 Nov 2021 07:23:01 +0000
Resent-Message-ID: <handler.51177.B51177.16367017418806 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 51177
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords:
To: Lars Ingebrigtsen <larsi@HIDDEN>
Cc: 51177 <at> debbugs.gnu.org, eller.helmut@HIDDEN
Received: via spool by 51177-submit <at> debbugs.gnu.org id=B51177.16367017418806
(code B ref 51177); Fri, 12 Nov 2021 07:23:01 +0000
Received: (at 51177) by debbugs.gnu.org; 12 Nov 2021 07:22:21 +0000
Received: from localhost ([127.0.0.1]:43301 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1mlQt9-0002Hw-B0
for submit <at> debbugs.gnu.org; Fri, 12 Nov 2021 02:22:21 -0500
Received: from eggs.gnu.org ([209.51.188.92]:50036)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <eliz@HIDDEN>) id 1mlQt3-0002Hc-Te
for 51177 <at> debbugs.gnu.org; Fri, 12 Nov 2021 02:22:17 -0500
Received: from [2001:470:142:3::e] (port=34960 helo=fencepost.gnu.org)
by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
id 1mlQsy-0002rQ-Lo; Fri, 12 Nov 2021 02:22:08 -0500
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=sPJK19B9HgO2mP4eJlPXjd3y/Po/DL8c2wU46ODPAGs=; b=GURbeTN1Pi+G
yecMd55qQDbdldoPzRzb3Vk1V/qA3ZfMpHCOfXapRbN/4iO112TXhSWrt1i0xWhxFhBvizL62Vf7+
OrlY+DGKUa9bWUuTG0lZnXKOjUhsLu2/DO2q6e91NbfNImQqsggB5uhoT7pI1c2EHEXv5ABg6K6Xi
+BjWTAt/QoBrLWjH6DmmA0aWf0gqRteKnG+GmkhC2y0FJiTF+moHJXLSwFWJtojrKb9bq1FyoH7la
pygzNtKaCuoEM3q3gzthtq7MAU6OI4pQIDqmslRyGwr7nxDo3XHRT33xjqlCmR8BylH7bUI2cefln
U8B8kYERxNWM/2XcMCXljQ==;
Received: from [87.69.77.57] (port=2287 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 1mlQsv-0008Qg-Lx; Fri, 12 Nov 2021 02:22:08 -0500
Date: Fri, 12 Nov 2021 09:21:45 +0200
Message-Id: <83ilwxzvna.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
In-Reply-To: <87sfw1sx62.fsf@HIDDEN> (message from Lars Ingebrigtsen on Fri,
12 Nov 2021 07:30:45 +0100)
References: <m2bl2qa2z6.fsf@HIDDEN> <87k0he2ghr.fsf@HIDDEN>
<m24k8iklbt.fsf@HIDDEN> <87sfw1sx62.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: Lars Ingebrigtsen <larsi@HIDDEN>
> Date: Fri, 12 Nov 2021 07:30:45 +0100
> Cc: 51177 <at> debbugs.gnu.org
>
> As for the patch itself, I'd worry that a subtle change in semantics
> here would break stuff (and this is an area that's full of notoriously
> subtle things), but perhaps it's OK. Anybody have an opinion here?
First, the patch included an fprintf that should probably be removed.
And second, I'd prefer to have a variable exposed to Lisp to control
this behavior, so that if someone finds some strange consequences, we
could ask them to flip the variable and see if the problem goes away.
My main worry is what happens if we try reading from a pipe to a
process that died, and so its end of the pipe could be closed. Was
this patch tested when process-connection-type is nil?
X-Loop: help-debbugs@HIDDEN
Subject: bug#51177: 29.0.50; stop-process on pipes
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: Fri, 12 Nov 2021 08:29:02 +0000
Resent-Message-ID: <handler.51177.B51177.163670574132722 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 51177
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords:
To: Eli Zaretskii <eliz@HIDDEN>
Cc: Lars Ingebrigtsen <larsi@HIDDEN>, 51177 <at> debbugs.gnu.org
Received: via spool by 51177-submit <at> debbugs.gnu.org id=B51177.163670574132722
(code B ref 51177); Fri, 12 Nov 2021 08:29:02 +0000
Received: (at 51177) by debbugs.gnu.org; 12 Nov 2021 08:29:01 +0000
Received: from localhost ([127.0.0.1]:43395 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1mlRvh-0008Ve-7N
for submit <at> debbugs.gnu.org; Fri, 12 Nov 2021 03:29:01 -0500
Received: from mail-wm1-f45.google.com ([209.85.128.45]:42717)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <eller.helmut@HIDDEN>) id 1mlRvc-0008VM-UQ
for 51177 <at> debbugs.gnu.org; Fri, 12 Nov 2021 03:28:59 -0500
Received: by mail-wm1-f45.google.com with SMTP id
d72-20020a1c1d4b000000b00331140f3dc8so6223650wmd.1
for <51177 <at> debbugs.gnu.org>; Fri, 12 Nov 2021 00:28:56 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
h=from:to:cc:subject:references:date:in-reply-to:message-id
:user-agent:mime-version:content-transfer-encoding;
bh=vzIJTHRyKkHOfYGkbvBIbXYw6X15mltC8V+NOc9BkO4=;
b=WbLI2DFxR7apMD8T42xwN6ypx1O2cFRvFqxswnmujj2i+1ciNkmy6w0nCaX/V77cz4
QmWxTgn/grVXMp/lV/LD7zsFe0ugPnep2oUPIRtgxhSskmaEHbSNY2/SkGZ5Rd1eTKxy
20UlRblDPn1nuopOt1Aibf7Jm4c+n+zbKdcW8z0ZwABli7HpTKGrPS/mxJWzL6i/Tu+2
LzrzhJ6YXldGEu7quuLfodZPG3bic3G6oWfWtccsky4V1qhJKQLZJOmu+R3NNofSpLYX
96f4tSQR7ENJTNRlaBQYq4rpX0Tvb5olgzRZnC/gS+cy13wUfNMIRmoVQRavT9tlABLv
P0tg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20210112;
h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to
:message-id:user-agent:mime-version:content-transfer-encoding;
bh=vzIJTHRyKkHOfYGkbvBIbXYw6X15mltC8V+NOc9BkO4=;
b=Dp8dL1l0eyGYSOTl88kyLdnqKyjQS1Pn3Ty6++vVz5b4AKXctkoXcVKarpttmnJGSq
MGhOURrfmCTPCZGa1ePxT3eU/0YjXMJB5w/7ZugUx4RXtT9msYwJTn0mGTDx+BQSkPmB
mrpYgyskdwcmlOKdP02C6nyqRLeth/3V1q5n5Ijg6FcOnsHqcUfryefFWV5rt7YuFqCy
enMUSFX0Flc8UiLD6cuSUxgh8p7qKc/eVDfi07J8OdLiTPxWMiMLK///L74AsQmVDisG
zenE9LQSd9LQO+5W3dQnecZZGsyChI0seDmtKjK8DW4a8J9AmPF1pBjs92dwrr5ZZGP+
hjew==
X-Gm-Message-State: AOAM530h5LzKoS+Efu7QmrRzYzv5a53eKR2E8DY1PrAzd2R5vfncMPkj
bBvq5+fo1TMQ5LB+QgXdtuYeFRigXPA=
X-Google-Smtp-Source: ABdhPJxendo7xIwYHTcfFUm1fY9nsROXoXhcqncmdFpjsBaKHv3rPL/6Rsq2XOSPy09PHGUrzLhEbg==
X-Received: by 2002:a05:600c:3584:: with SMTP id
p4mr15334037wmq.65.1636705730964;
Fri, 12 Nov 2021 00:28:50 -0800 (PST)
Received: from caladan ([31.177.117.48])
by smtp.gmail.com with ESMTPSA id w17sm5426488wrp.79.2021.11.12.00.28.50
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Fri, 12 Nov 2021 00:28:50 -0800 (PST)
From: Helmut Eller <eller.helmut@HIDDEN>
References: <m2bl2qa2z6.fsf@HIDDEN> <87k0he2ghr.fsf@HIDDEN>
<m24k8iklbt.fsf@HIDDEN> <87sfw1sx62.fsf@HIDDEN>
<83ilwxzvna.fsf@HIDDEN>
Date: Fri, 12 Nov 2021 09:28:49 +0100
In-Reply-To: <83ilwxzvna.fsf@HIDDEN> (Eli Zaretskii's message of "Fri, 12 Nov
2021 09:21:45 +0200")
Message-ID: <m2fss1kcam.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
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 Fri, Nov 12 2021, Eli Zaretskii wrote:
>> From: Lars Ingebrigtsen <larsi@HIDDEN>
>> Date: Fri, 12 Nov 2021 07:30:45 +0100
>> Cc: 51177 <at> debbugs.gnu.org
>>=20
>> As for the patch itself, I'd worry that a subtle change in semantics
>> here would break stuff (and this is an area that's full of notoriously
>> subtle things), but perhaps it's OK. Anybody have an opinion here?
Ideally, there'd be test suite for those subtleties...
> First, the patch included an fprintf that should probably be removed.
Yes, of course.
> And second, I'd prefer to have a variable exposed to Lisp to control
> this behavior, so that if someone finds some strange consequences, we
> could ask them to flip the variable and see if the problem goes away.
Maybe that variable could be the filter itself. We could delay closing
file descriptors only if the filter=3D=3Dt. For the other values,
everything could stay as now.
> My main worry is what happens if we try reading from a pipe to a
> process that died, and so its end of the pipe could be closed. Was
> this patch tested when process-connection-type is nil?
Just tested it. Works.
I do wonder why the part of the code with the comment "If process is
still active, read any output that remains" is not executed for the
deleting_process. It seems to me that this creates the possibility (with
very low probability) that we forget to read the last chunk of output in
the usual case where filter =E2=89=A0 t.
Helmut
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.