From: Michael Albinus <michael.albinus@gmx.de>
To: Thomas Koch <thomas@koch.ro>
Cc: "12145@debbugs.gnu.org" <12145@debbugs.gnu.org>,
"João Távora" <joaotavora@gmail.com>
Subject: bug#12145: Fix causes problems with other processes
Date: Thu, 02 Mar 2023 18:03:16 +0100 [thread overview]
Message-ID: <87lekfxezv.fsf@gmx.de> (raw)
In-Reply-To: <1196619804.249665.1677773294263@office.mailbox.org> (Thomas Koch's message of "Thu, 2 Mar 2023 18:08:14 +0200 (EET)")
Thomas Koch <thomas@koch.ro> 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.
next prev parent reply other threads:[~2023-03-02 17:03 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-06 2:05 bug#12145: 24.1.50; enable-remote-dir-locals breaks find-name-dired in TRAMP buffers Matt McClure
2012-08-06 12:18 ` Michael Albinus
2012-08-20 14:07 ` Michael Albinus
2012-08-28 14:12 ` Matt McClure
2012-08-28 14:42 ` Michael Albinus
2023-03-02 10:48 ` bug#12145: Fix causes problems with other processes Thomas Koch
2023-03-02 16:08 ` Thomas Koch
2023-03-02 17:03 ` Michael Albinus [this message]
2023-03-02 19:00 ` Thomas Koch
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87lekfxezv.fsf@gmx.de \
--to=michael.albinus@gmx.de \
--cc=12145@debbugs.gnu.org \
--cc=joaotavora@gmail.com \
--cc=thomas@koch.ro \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).