|
From: | Jim Porter |
Subject: | bug#56025: [WIP PATCH] 29.0.50; em-extpipe-test-2 times out on EMBA and Cygwin |
Date: | Mon, 18 Jul 2022 18:58:45 -0700 |
On 7/18/2022 1:09 AM, Michael Albinus wrote:
I haven't tested, but it looks like it won't work with remote processes foo and bar. Something like --8<---------------cut here---------------start------------->8--- ~ $ cd /ssh:remotehost: /ssh:remotehost:~ $ *ls | *grep a --8<---------------cut here---------------end--------------->8---
Hmm, yeah. We'll need to do something with the Tramp case. I think the minimal fix would be to update `tramp-sh-handle-make-process' so that it doesn't signal an error when :connection-type is a cons cell. That's pretty easy.
However, it seems that Tramp doesn't fully support :connection-type yet (testing on both Emacs 28.1 and 29). I used the following Python script, and tried a few varieties of `make-process' calls over Tramp. I'd expect that when I set :connection-type to `pipe', it would print False for all the streams, but it seems that the script always sees stdin and stdout as TTYs no matter what options I use.
------------------------------ #!/usr/bin/env python3 import sys print('stdin: {}\nstdout: {}\nstderr: {}\n'.format( sys.stdin.isatty(), sys.stdout.isatty(), sys.stderr.isatty() )) ------------------------------On the other hand, if I set :stderr to be a buffer, then the script *does* see stderr as a pipe, but that makes sense looking at the code: when using :stderr, Tramp redirects the process's stderr to a file (and then cats it back out).
Maybe there's a relatively easy way to get Tramp to respect :connection-type, but I tried a couple of things and they didn't work quite right. Still, that could be a followup for later. So long as it doesn't error out immediately when it's a cons cell, I think it would be ok.
[Prev in Thread] | Current Thread | [Next in Thread] |