[Top][All Lists]

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

Re: tramp ControlMaster options

From: Yuri D'Elia
Subject: Re: tramp ControlMaster options
Date: Mon, 20 Jul 2015 22:41:02 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.0

On 20/07/15 20:43, Michael Albinus wrote:
> Likely you mean `tramp-ssh-controlmaster-options'. This is a variable,
> and it will be computed only when it is needed. No Tramp ssh connection,
> no probe of ssh for this.

I hope I understand how defcustom works(?).
In emacs 24.5.1, I see this at line 310 of tramp.el:

(defcustom tramp-ssh-controlmaster-options

whose standard value is computed by calling ssh a few times.
I don't know what the ;;;###tramp-autoload cookie does though, but no
miracles I assume?

Just to confirm, this is the output of "strace -f -e trace=process"
after a (require 'tramp):

[pid  2189] vfork(Process 2255 attached
 <unfinished ...>
[pid  2255] execve("/usr/bin/ssh", ["/usr/bin/ssh", "-o",
"ControlMaster"], [/* 73 vars */] <unfinished ...>
[pid  2189] <... vfork resumed> )       = 2255
[pid  2255] <... execve resumed> )      = 0
[pid  2255] arch_prctl(ARCH_SET_FS, 0x7fcdde4cd800) = 0

>> Any reason why we cannot use `ssh -o BatchMode=yes [various flags]
>>' instead of using a domain name? This would greatly reduce the
>> issue.
> The function (!) `tramp-ssh-controlmaster-options' uses "localhost" for
> test. This shall avoid DNS requests.

Still connects to a valid host, which might have a daemon running (in
fact, I have one on localhost for debugging).

If there's no reason to connect to something, call

I love that tramp detects ControlMaster support in ssh, but calling
external processes on load, if really needed, should /really/ be quick.

reply via email to

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