bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#71709: Fix recent change in tramp-sh-handle-make-process


From: Michael Albinus
Subject: bug#71709: Fix recent change in tramp-sh-handle-make-process
Date: Sat, 22 Jun 2024 13:18:05 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

Iurie Marian <marian.iurie@gmail.com> writes:

> Hello Michael,

Hi Iurie,

> Could you please try the below snippet?
> Evaluate it in a local and _remote_ buffer.
> ```
> ;; -*- lexical-binding: t; -*-
>
> (let ((.test-buffer (get-buffer-create "*test buffer*"))
>       (.remote? (file-remote-p default-directory)))
>   (with-current-buffer .test-buffer
>     (goto-char (max-char))
>     (insert "====================\n")
>     (insert (if .remote? "Remote:\n" "Local :\n")))
>
>   (make-process :file-handler t
>                 :connection-type 'pipe
>                 :name "test proc"
>                 :stderr .test-buffer
>                 :noquery t
>                 :command (list "echo" "Hello!")
>                 :filter (lambda (proc str)
>                           (with-current-buffer .test-buffer
>                             (goto-char (max-char))
>                             (insert "test proc output: " str)))))
> ```
>
> I get the below output:
> ```
> ====================
> Local :
>
> Process test proc stderr finished
> test proc output: Hello!
> ====================
> Remote:
> /usr/bin/cat: /tmp/tramp.J0RZDc: No such file or directory
> ```
>
> I would expect "Hello!" output from _remote_ as well. Isn't it?
> It seems that the process is not executed and the output
> "/usr/bin/cat: /tmp/tramp.J0RZDc: No such file or directory" is from
> stderr.

Thanks for the recipe. I've played with it. Most cases, it works as
expected, but sometimes I see a similar error. Looks like a race
condition. I'll debug further.

> Kind Regards,
> Iurie

Best regards, Michael.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]