What/where is the logic that determines whether tramp reuses its current connection in order to execute a process or creates a new connection?

Is it as simple as spawning a process synchronously vs async?

  • I think connection re-use might depend on ssh ControlMaster? I feel like tramp pretty much made a new connection for everything when I wasn't using that. Until relatively recently it wasn't a default behaviour for tramp to use ControlMaster (previously you needed to use the scpc or rsyncc methods explicitly), and the feature also isn't available everywhere. I've seen the tramp maintainer answering questions here, though, so I suspect they might provide you with a definitive answer.
    – phils
    Mar 21, 2016 at 23:22

1 Answer 1


Yes, it is sync vs async. Emacs offers two basic functions for creating a new process on a remote machine, process-file and start-file-process. The former function creates a new synchronous process (reusing an existing connection), and the latter function creates a new asynchronous process (opening a new connection).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.