[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: tramp ControlMaster options
From: |
Thierry Volpiatto |
Subject: |
Re: tramp ControlMaster options |
Date: |
Tue, 21 Jul 2015 07:09:39 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
Yuri D'Elia <address@hidden> writes:
> 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
> ...
So IIUC tramp is calling ssh at load time when evaling its defcustom ?!!
>>> Any reason why we cannot use `ssh -o BatchMode=yes [various flags]
>>> 0.0.0.0' 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 0.0.0.0.
Isn't it possible to setup the default value of
`tramp-ssh-controlmaster-options' only when tramp is involved (i.e at
first connection) instead of evaling this at load time ?
If tramp hang forever like it is the case actually user will know why
emacs is hanging.
> I love that tramp detects ControlMaster support in ssh, but calling
> external processes on load, if really needed, should /really/ be quick.
IMHO this should not happen at load time.
Thanks.
--
Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997
- package.el: what does package "Checking ... " actually do?, Yuri D'Elia, 2015/07/17
- Re: package.el: what does package "Checking ... " actually do?, Artur Malabarba, 2015/07/17
- Re: package.el: what does package "Checking ... " actually do?, Yuri D'Elia, 2015/07/18
- tramp ControlMaster options (was: Re: package.el: what does package "Checking ... " actually do?), Yuri D'Elia, 2015/07/18
- Message not available
- Re: tramp ControlMaster options, Michael Albinus, 2015/07/20
- Re: tramp ControlMaster options, Thierry Volpiatto, 2015/07/20
- Re: tramp ControlMaster options, Yuri D'Elia, 2015/07/20
- Re: tramp ControlMaster options, Michael Albinus, 2015/07/20
- Re: tramp ControlMaster options, Yuri D'Elia, 2015/07/20
- Re: tramp ControlMaster options,
Thierry Volpiatto <=
- Re: tramp ControlMaster options, Michael Albinus, 2015/07/21
- Re: tramp ControlMaster options, Thierry Volpiatto, 2015/07/21
- Re: tramp ControlMaster options, Yuri D'Elia, 2015/07/21
- Re: tramp ControlMaster options, Michael Albinus, 2015/07/22