From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.bugs Subject: bug#12145: Fix causes problems with other processes Date: Thu, 02 Mar 2023 18:03:16 +0100 Message-ID: <87lekfxezv.fsf@gmx.de> References: <202231886.202734.1677754136372@office.mailbox.org> <1196619804.249665.1677773294263@office.mailbox.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1314"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: "12145@debbugs.gnu.org" <12145@debbugs.gnu.org>, =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= To: Thomas Koch Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Mar 02 18:04:19 2023 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 1pXmLq-0000CR-Nr for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 02 Mar 2023 18:04:18 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pXmLd-0007eX-18; Thu, 02 Mar 2023 12:04:05 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pXmLa-0007do-JI for bug-gnu-emacs@gnu.org; Thu, 02 Mar 2023 12:04:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pXmLa-0005Ij-AV for bug-gnu-emacs@gnu.org; Thu, 02 Mar 2023 12:04:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pXmLZ-00076J-Ph for bug-gnu-emacs@gnu.org; Thu, 02 Mar 2023 12:04:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 02 Mar 2023 17:04:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12145 X-GNU-PR-Package: emacs Original-Received: via spool by 12145-submit@debbugs.gnu.org id=B12145.167777660727241 (code B ref 12145); Thu, 02 Mar 2023 17:04:01 +0000 Original-Received: (at 12145) by debbugs.gnu.org; 2 Mar 2023 17:03:27 +0000 Original-Received: from localhost ([127.0.0.1]:58279 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pXmL1-00075J-EA for submit@debbugs.gnu.org; Thu, 02 Mar 2023 12:03:27 -0500 Original-Received: from mout.gmx.net ([212.227.17.21]:49171) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pXmKy-000753-JQ for 12145@debbugs.gnu.org; Thu, 02 Mar 2023 12:03:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.de; s=s31663417; t=1677776598; i=michael.albinus@gmx.de; bh=6iwpyLlqcK0L2idLUd90xcT9prReeeqGmvzrEyDnYns=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date; b=htZZm/syinXcN4d91qGfJ9kufGoNc+VGSIIJBM/YgtblRdxgZHP4pFrlA/0OpW/zT YvYUeRkGRiZfs89xNb5dHjFc1iZb1RO+dPlf8s9zlFnlktJ7hCKlmUTcIcG3oX5rrw Fk2aAUlsKlk1aZfNKuL9VvtQFK2XWQp4cvWHCMYK7pX6ZBnq+lOU96a4Jm0x0DUcPP 31QKrJWAnkQYZCID/NnkPZLjNePg0ChUsx/VGdGbF/gl/Fhq2dPtIDVYhJ2J6cLLFp lCZ8LlAnuwB12Gu+76dBuLIjm0okK5ESeb+7KV9PyuyrXsjmxSV4Si6AsylzwcSQwT UmsVYx2nb1TwA== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Original-Received: from gandalf.gmx.de ([185.89.39.22]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1N5G9t-1qYZdY3qPV-0118Nm; Thu, 02 Mar 2023 18:03:17 +0100 In-Reply-To: <1196619804.249665.1677773294263@office.mailbox.org> (Thomas Koch's message of "Thu, 2 Mar 2023 18:08:14 +0200 (EET)") X-Provags-ID: V03:K1:DwlXTz22lF2/h0McNuayBTxEZ9XVKUojJhJVmJ4BznwoVPdRs1P J0oYymFUVgbMf7exv4lszS5LYmmrNjdEUAHP3x3KMJ9WufZVPxmXmR4z9u7zklcpC15iO1G NAEp5evvcB+KK15LhEBLX1esixzOkXa2jAeH6PQ0965Gn+oaMvQraKW0t6JTCY44ctI/jRE s7KrlDA4HBYEI3oVEeXrg== UI-OutboundReport: notjunk:1;M01:P0:VukU01BpS+c=;5ezNZ5WApcUTtFX70pCTcO87EcE vDqAGjWsAwOPUIqOLZmJF8hEgFAGYpNq38fsWXWlElpe/xoQ46i4oglzqQsm9fOSLSJDyWvUf 0PWmfskUAtUTYHfA2/GCOkBUjtdE+CLc1MNezDJW3fhhxjn+wArrKBHlx24GEHfqiPmvPC9xU HwNpdqKCOK/XGi2TbFOzwykBE3XGtBIlOTbSLu2V4CXC3U04EyJTgu8LL22UhNGrFw8W6W6XK r9BWX9ju4pXkzHZpRDEdmaVitPV0cBFfPgj4yfWjat8Ma+WgmiRiKmHOxa9yEAv/om++NDARo /GJy6UivW/QmG/fRRhDX2XtgqRTTjW+Pp+Gh1HimI7NmpBvS1Unj4CumKXp/NvjW7kaXOnFwo 1ndii4mENCRKXZHXsc37MZYp9dKz28sMN3mY04b/xLmcSowEue18YSyTeP3TQxFZixinV2U7I f2fp98dUayKGdkPf8cR++TNEd+8gX7odPOnv84dEESZpwy0veL7DpNZkIC5u5fo/ut6zcebh9 H6LSddgfsE2FSbp0o92HDav9512Tfo6UEd3iBNNKbcYe3XwsKelYTHMos6/Z08ZPi3dyBsAJ9 AYrj0n5+Z0AC9RpW21pAsSJdsho4gT1skW+v6pP7PlIobyZmt8gJ4+hwVU5cQqGdd90s0vDfs 1ZWXyiywq/SFrAYNIMzC+nf9sBxwG3r8kfDRgR1qL8tR8At/WtfIoWi4idImUNQrT5q1gOTDw dGE46TJvkYr3JILUUcHBVztQKB7bKOX1/w6Mi7mknhNnZxr+hbn7/4WNfSogKdTyjc3qsfte 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:257172 Archived-At: Thomas Koch writes: Hi Thomas, > The problem identified by the first backtrace still exists even with the patch for this bug from 2012. It happens, when find-name-dired on a remote system returns very fast (or maybe when the output is very short?), e.g. when called on an empty directory. > > The function `find-dired` starts a background shell process: > > (shell-command (concat args "&") (current-buffer)) > > A few lines later, the function asks for the process and uses it without any error checking: > > (let ((proc (get-buffer-process (current-buffer)))) > (set-process-filter proc (function find-dired-filter)) > > I assume, that get-buffer-process returns nil when the process has already terminated. Good analysis, thanks. I'll play with this, hopefully I can reproduce. On a first glance (w/o testing), something like this could work: (let (proc) (while (not (process-alive-p (setq proc (get-buffer-process (current-buffer)))))) (set-process-filter proc (function find-dired-filter)) ...) > I don't have an idea about the second backtrace yet. But given that the code of find-name-dired seems problematic, this might be a motivation to not search for a fix in tramp but in find-name-dired (and called functions). I'll check. Best regards, Michael.