From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#12972: [PATCH] Avoid regression in mailcap-view-file similar to Bug#44824 Date: Sun, 04 Jul 2021 16:49:53 +0300 Message-ID: <83zgv2gpdq.fsf@gnu.org> References: <87r1hmdqek.fsf__16088.3597027109$1622530682$gmane$org@gnus.org> <835yxtlw14.fsf__2546.8955327355$1625164803$gmane$org@gnu.org> <1ddf1c46-0a28-4a2d-cc40-094ff74ee0ac@gmail.com> <837di8ki24.fsf__46278.4886871063$1625229533$gmane$org@gnu.org> <831r8gk4m0.fsf__14172.0669272885$1625246977$gmane$org@gnu.org> <1825a6f3-0175-2d67-5608-41c9fb93889b@gmail.com> <83im1ripaz.fsf__31901.4239286602$1625313464$gmane$org@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7653"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 12972@debbugs.gnu.org To: Maxim Nikulin Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jul 04 15:50:12 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 1m02Vf-0001kz-LH for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 04 Jul 2021 15:50:11 +0200 Original-Received: from localhost ([::1]:38010 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m02Ve-0001Xw-Gc for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 04 Jul 2021 09:50:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33960) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m02VW-0001Wj-Df; Sun, 04 Jul 2021 09:50:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:57293) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m02VW-0006SE-6d; Sun, 04 Jul 2021 09:50:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m02VW-0006Lf-3Z; Sun, 04 Jul 2021 09:50:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, emacs-orgmode@gnu.org Resent-Date: Sun, 04 Jul 2021 13:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12972 X-GNU-PR-Package: emacs,org-mode X-GNU-PR-Keywords: patch Original-Received: via spool by 12972-submit@debbugs.gnu.org id=B12972.162540659724388 (code B ref 12972); Sun, 04 Jul 2021 13:50:02 +0000 Original-Received: (at 12972) by debbugs.gnu.org; 4 Jul 2021 13:49:57 +0000 Original-Received: from localhost ([127.0.0.1]:40606 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m02VR-0006LH-2A for submit@debbugs.gnu.org; Sun, 04 Jul 2021 09:49:57 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:36194) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m02VO-0006L0-HW for 12972@debbugs.gnu.org; Sun, 04 Jul 2021 09:49:55 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:42128) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m02VI-0006KK-UL; Sun, 04 Jul 2021 09:49:48 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2940 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m02VI-0005XX-1X; Sun, 04 Jul 2021 09:49:48 -0400 In-Reply-To: (message from Maxim Nikulin on Sun, 4 Jul 2021 20:37:24 +0700) 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:209394 Archived-At: > From: Maxim Nikulin > Date: Sun, 4 Jul 2021 20:37:24 +0700 > > I admit that I wrongly added ":noquery t", for some reason I believed > that it allows to choose whether processes are allowed to exist longer > than emacs or it is preferred to kill them with emacs. Actually > asynchronous processes are killed always and the option manages the > query only. This option should be dropped to restore compatibility with > previous variant. > > I have not found a way to detach asynchronous process from emacs. > Surprisingly it is possible for synchronous processes but it is > impossible to detect failure (thus to allow a user to figure out what > has happened) > > (process-file-shell-command command nil 0 nil) > > So process API in emacs is a kind of a short blanket. > > Accidentally I have created an example of program that is incompatible > with 'pipe asynchronous processes in emacs > > #!/bin/sh > exec 1>&- > exec 2>&- > sleep 30 > > (let ((command "cpu-stress-test") > (process-connection-type nil)) > (start-process-shell-command command nil command)) > > And emacs (at least 26.3) consumes 100% CPU for the specified amount of > time. I do not see any reason to do so since the program does not do > anything ugly. I have not found a way to explicitly force emacs to close > pipes. That is why I consider it as an outstanding bug. Emacs must > properly handle closed pipes. > > So `process-file-shell-command' ... 0 is better than current > `start-process-shell-command' but it does not allow to add error handling. > > So besides that I still have no guess what problem you suspect, now I > know that emacs may become mad in response to purely innocent action of > a child process. Sorry, I'm not sure I understand what this is all about. Are you still talking about the patch you proposed?