GNU bug report logs -
#43226
28.0.50; Running Tramp tests on MS-Windows leaves zombie processes on the remote
Previous Next
Full log
Message #53 received at 43226 <at> debbugs.gnu.org (full text, mbox):
Eli Zaretskii <eliz <at> gnu.org> writes:
> So the ->pty_flag case is not for Windows. And even if we did try
> using it, it wouldn't have worked for local processes, because Ctrl-D
> is NOT the EOF character on Windows; it's Ctrl-Z, and then only if the
> sub-process does text-mode reads (in binary mode, there's no way to
> send EOF to a subprocess, only kill it).
You're right – when trying the test case with just ssh in Emacs 28 on
Windows, process-send-eof successfully terminates the remote cat
process, it just never receives the actual Ctrl-D. (Verified this by
stracing the remote cat process.)
The test case where I call start-file-process with default-directory
pointing to a remote directory ("/sshx:...") and run simply "cat"
behaves differently in that it runs cmdproxy.exe instead of ssh.exe
directly, uses the -t option twice to force creation of PTYs on the
remote end, and uses -o RemoteCommand="/bin/sh -i" for interactive
shell. It does not seem to receive any input from Emacs, and stays
running.
Same things also happens if I run the test with "ssh -t -t" so
apparently somehow pseudo terminals on the remote end causes issues
here.
The normal "ssh" method (without -x) does not seem to be able to connect
at all on my Windows system for whatever reason, so I can't comment if
works any better.
Interestingly, similar test on Emacs 27.1 on GNU/Linux
receives the input but the cat process also stays running there, so
not sure if process-send-eof does the right thing even here.
(let* ((default-directory "/sshx:happy:/tmp")
(sshz (start-file-process "eoftest" (get-buffer-create "*eoftest*") "cat")))
(list-processes)
(sit-for 10) ; Run strace -p $(pgrep cat) on remote
(process-send-string sshz "foo")
(process-send-eof sshz))
strace: Process 18005 attached
read(0, "foo", 131072) = 3
write(1, "foo", 3) = 3
read(0,
This bug report was last modified 2 years and 235 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.