unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Michael Albinus <michael.albinus@gmx.de>
To: "Sébastien Gross" <seb@chezwam.org>
Cc: 8929@debbugs.gnu.org
Subject: bug#8929: 24.0.50; tramp hangs when process died
Date: Sun, 26 Jun 2011 10:48:42 +0200	[thread overview]
Message-ID: <87oc1l7zbp.fsf@gmx.de> (raw)
In-Reply-To: <87tybf4b6l.fsf@ubik.of1par.int.rtblw.com> ("Sébastien Gross"'s message of "Fri, 24 Jun 2011 15:21:38 +0200")

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.





  reply	other threads:[~2011-06-26  8:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-24 13:21 bug#8929: 24.0.50; tramp hangs when process died Sébastien Gross
2011-06-26  8:48 ` Michael Albinus [this message]
2011-06-27  8:57   ` Sébastien Gross
2011-07-01 12:59     ` Michael Albinus
2011-07-07 13:24       ` Michael Albinus
     [not found]         ` <87wrfu9kkd.fsf@ubik.of1par.int.rtblw.com>
2011-07-07 15:52           ` 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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=87oc1l7zbp.fsf@gmx.de \
    --to=michael.albinus@gmx.de \
    --cc=8929@debbugs.gnu.org \
    --cc=seb@chezwam.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 public inbox

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

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).