From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Helmut Eller Newsgroups: gmane.emacs.bugs Subject: bug#51177: 29.0.50; stop-process on pipes Date: Fri, 12 Nov 2021 09:28:49 +0100 Message-ID: References: <87k0he2ghr.fsf@gnus.org> <87sfw1sx62.fsf@gnus.org> <83ilwxzvna.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5720"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: Lars Ingebrigtsen , 51177@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Nov 12 09:29:28 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mlRw8-0001Is-68 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 12 Nov 2021 09:29:28 +0100 Original-Received: from localhost ([::1]:43700 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mlRw6-0004br-7o for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 12 Nov 2021 03:29:26 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:33646) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mlRvj-0004EI-9u for bug-gnu-emacs@gnu.org; Fri, 12 Nov 2021 03:29:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:60083) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mlRvi-0002lD-Gs for bug-gnu-emacs@gnu.org; Fri, 12 Nov 2021 03:29:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mlRvi-0008W0-EO for bug-gnu-emacs@gnu.org; Fri, 12 Nov 2021 03:29:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Helmut Eller Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 12 Nov 2021 08:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51177 X-GNU-PR-Package: emacs Original-Received: via spool by 51177-submit@debbugs.gnu.org id=B51177.163670574132722 (code B ref 51177); Fri, 12 Nov 2021 08:29:02 +0000 Original-Received: (at 51177) by debbugs.gnu.org; 12 Nov 2021 08:29:01 +0000 Original-Received: from localhost ([127.0.0.1]:43395 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mlRvh-0008Ve-7N for submit@debbugs.gnu.org; Fri, 12 Nov 2021 03:29:01 -0500 Original-Received: from mail-wm1-f45.google.com ([209.85.128.45]:42717) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mlRvc-0008VM-UQ for 51177@debbugs.gnu.org; Fri, 12 Nov 2021 03:28:59 -0500 Original-Received: by mail-wm1-f45.google.com with SMTP id d72-20020a1c1d4b000000b00331140f3dc8so6223650wmd.1 for <51177@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) Original-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) In-Reply-To: <83ilwxzvna.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 12 Nov 2021 09:21:45 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:219751 Archived-At: On Fri, Nov 12 2021, Eli Zaretskii wrote: >> From: Lars Ingebrigtsen >> Date: Fri, 12 Nov 2021 07:30:45 +0100 >> Cc: 51177@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