all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Thierry Volpiatto <thierry.volpiatto@gmail.com>
To: emacs-devel@gnu.org
Subject: Re: tramp ControlMaster options
Date: Tue, 21 Jul 2015 07:09:39 +0200	[thread overview]
Message-ID: <87mvyqjdv0.fsf@gmail.com> (raw)
In-Reply-To: mojmcu$uma$1@ger.gmane.org

Yuri D'Elia <wavexx@thregr.org> 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 




  reply	other threads:[~2015-07-21  5:09 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-17 11:11 package.el: what does package "Checking ... " actually do? Yuri D'Elia
2015-07-17 12:36 ` Artur Malabarba
2015-07-17 13:19   ` Artur Malabarba
2015-07-18 11:22 ` Yuri D'Elia
2015-07-18 12:44   ` tramp ControlMaster options (was: Re: package.el: what does package "Checking ... " actually do?) Yuri D'Elia
     [not found]   ` <55AA4AF3.2030901@thregr.org>
2015-07-20  5:38     ` tramp ControlMaster options Michael Albinus
2015-07-20  6:21       ` Thierry Volpiatto
2015-07-20  8:07         ` Yuri D'Elia
2015-07-20 18:43           ` Michael Albinus
2015-07-20 20:41             ` Yuri D'Elia
2015-07-21  5:09               ` Thierry Volpiatto [this message]
2015-07-21  5:53                 ` Michael Albinus
2015-07-21  7:22                   ` Thierry Volpiatto
2015-07-21 10:59                   ` Yuri D'Elia
2015-07-22  5:58                     ` Michael Albinus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mvyqjdv0.fsf@gmail.com \
    --to=thierry.volpiatto@gmail.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.