[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#8929: 24.0.50; tramp hangs when process died
From: |
Michael Albinus |
Subject: |
bug#8929: 24.0.50; tramp hangs when process died |
Date: |
Sun, 26 Jun 2011 10:48:42 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
Sébastien Gross <seb@chezwam.org> writes:
> Hi,
Hi,
> When this process dies for some reasons (such ad IP change or network
> outrage), the associated buffer is still alive and makes tramp hanging
> when trying to reconnect the remote host.
>
> This behavior happens every time I carry my laptop (in suspend to disk
> or suspend to ram mode) from my home to my office (or the way back).
>
> Here is a patch (for tramp-sh.el) to add a sentinel that kills the
> process buffer when the process exit:
>
> Hope this doesn't break anything.
I wouldn't like to add such a radical buffer kill. Asynchronous
processes on remote hosts would loose their output buffer, when they
have finished. Debugging of Tramp problems would be harder.
On GNU Linux systems, it might be possible to catch D-Bus signals for
resuming the system after hibernate or suspend. Could you, please, eval
the following lines, and see whether Tramp behaves better?
--8<---------------cut here---------------start------------->8---
(require 'dbus)
(dbus-register-signal
:system "org.freedesktop.UPower" "/org/freedesktop/UPower"
"org.freedesktop.UPower" "Resuming" 'tramp-cleanup-all-connections)
--8<---------------cut here---------------end--------------->8---
If this works for you (it does for me), I would add a custom option for
enabling this behaviour.
Maybe we shall even introduce a variable `system-resume-hook', which
keeps functions to be called when Emacs continues to run after a
hibernate or suspend of the machine.
> Cheers.
Best regards, Michael.