unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Tramp / process has died
@ 2007-11-24 23:07 David Reitter
  2007-11-25 10:44 ` Michael Albinus
  0 siblings, 1 reply; 4+ messages in thread
From: David Reitter @ 2007-11-24 23:07 UTC (permalink / raw)
  To: emacs-help gnu gnu

How can I make tramp reconnect automatically to its ssh connection  
when it detects that the process "has died"?

As a laptop users, my network connection will occasionally break down,  
so it's perfectly normal for an SSH connection to be terminated. I  
would want tramp to react appropriately and rebuild the connection  
when necessary.

Can this be done?

Thanks
- D

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Tramp / process has died
  2007-11-24 23:07 Tramp / process has died David Reitter
@ 2007-11-25 10:44 ` Michael Albinus
  2007-11-25 11:32   ` David Reitter
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Albinus @ 2007-11-25 10:44 UTC (permalink / raw)
  To: david.reitter; +Cc: emacs-help gnu gnu

David Reitter <david.reitter@gmail.com> writes:

> How can I make tramp reconnect automatically to its ssh connection
> when it detects that the process "has died"?

Which Tramp version do you use? The upcoming Tramp 2.1.12 has a new
command `tramp-cleanup-connection', which you can call interactively.
This is not "reconnect automatically", but it could be a starting point.

I could also try to let it run in the background when it detects a
broken connection. But this needs more sophisticated checks, in order
not to run into an infinite loop.

A sledge-hammer workaround, also applicable in Tramp 2.0, is to delete
the Tramp connection buffer *tramp/ssh ...*

> Thanks
> - D

Best regards, Michael.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Tramp / process has died
  2007-11-25 10:44 ` Michael Albinus
@ 2007-11-25 11:32   ` David Reitter
  2007-11-25 13:50     ` Michael Albinus
  0 siblings, 1 reply; 4+ messages in thread
From: David Reitter @ 2007-11-25 11:32 UTC (permalink / raw)
  To: Michael Albinus; +Cc: emacs-help gnu gnu

On 25 Nov 2007, at 10:44, Michael Albinus wrote:

> David Reitter <david.reitter@gmail.com> writes:
>
>> How can I make tramp reconnect automatically to its ssh connection
>> when it detects that the process "has died"?
>
> Which Tramp version do you use? The upcoming Tramp 2.1.12 has a new
> command `tramp-cleanup-connection', which you can call interactively.
> This is not "reconnect automatically", but it could be a starting  
> point.

I'm running "2.0.57-pre", which is, I believe, what comes with Emacs  
22.x (CVS).

In principle what I'm doing is to quit the stack trace that I'm  
getting, and then to retry the command again. But as a user, I don't  
want that interruption - I just want it to reconnect automatically.

> I could also try to let it run in the background when it detects a
> broken connection. But this needs more sophisticated checks, in order
> not to run into an infinite loop.

Sure, reconnection attempts should be timed and spaced. Perhaps you  
can initiate them whenever a new IP address has been assigned to the  
host. And "background" is good, because this would minimize the  
"hanging" when saving (and all other accesses) (i.e. busy time in  
which Emacs is unresponsive to user input apart from C-g).

- D

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Tramp / process has died
  2007-11-25 11:32   ` David Reitter
@ 2007-11-25 13:50     ` Michael Albinus
  0 siblings, 0 replies; 4+ messages in thread
From: Michael Albinus @ 2007-11-25 13:50 UTC (permalink / raw)
  To: david.reitter; +Cc: emacs-help gnu gnu

David Reitter <david.reitter@gmail.com> writes:

>> Which Tramp version do you use? The upcoming Tramp 2.1.12 has a new
>> command `tramp-cleanup-connection', which you can call interactively.
>> This is not "reconnect automatically", but it could be a starting
>> point.
>
> I'm running "2.0.57-pre", which is, I believe, what comes with Emacs
> 22.x (CVS).

Yep, that is the Tramp version in the EMACS_22_BASE branch. But Tramp
2.0 will see bug fixes only, no new features.

>> I could also try to let it run in the background when it detects a
>> broken connection. But this needs more sophisticated checks, in order
>> not to run into an infinite loop.
>
> Sure, reconnection attempts should be timed and spaced. Perhaps you
> can initiate them whenever a new IP address has been assigned to the
> host.

Tramp does not know the underlying IP address. It will need another
approach for check. I will play a little bit with ...

> - D

Best regards, Michael.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-11-25 13:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-24 23:07 Tramp / process has died David Reitter
2007-11-25 10:44 ` Michael Albinus
2007-11-25 11:32   ` David Reitter
2007-11-25 13:50     ` Michael Albinus

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).