From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.bugs Subject: bug#8929: 24.0.50; tramp hangs when process died Date: Sun, 26 Jun 2011 10:48:42 +0200 Message-ID: <87oc1l7zbp.fsf@gmx.de> References: <87tybf4b6l.fsf@ubik.of1par.int.rtblw.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1309078167 4648 80.91.229.12 (26 Jun 2011 08:49:27 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 26 Jun 2011 08:49:27 +0000 (UTC) Cc: 8929@debbugs.gnu.org To: =?UTF-8?Q?S=C3=A9bastien?= Gross Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jun 26 10:49:23 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Qal1s-0001EH-Cs for geb-bug-gnu-emacs@m.gmane.org; Sun, 26 Jun 2011 10:49:20 +0200 Original-Received: from localhost ([::1]:40237 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qal1r-0001vW-AN for geb-bug-gnu-emacs@m.gmane.org; Sun, 26 Jun 2011 04:49:19 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:53582) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qal1c-0001vJ-Ml for bug-gnu-emacs@gnu.org; Sun, 26 Jun 2011 04:49:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qal1a-0000j6-Nk for bug-gnu-emacs@gnu.org; Sun, 26 Jun 2011 04:49:04 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:48049) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qal1a-0000iz-MC for bug-gnu-emacs@gnu.org; Sun, 26 Jun 2011 04:49:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1Qal1a-0003Vq-1K; Sun, 26 Jun 2011 04:49:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Albinus Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 26 Jun 2011 08:49:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 8929 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 8929-submit@debbugs.gnu.org id=B8929.130907813813493 (code B ref 8929); Sun, 26 Jun 2011 08:49:01 +0000 Original-Received: (at 8929) by debbugs.gnu.org; 26 Jun 2011 08:48:58 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Qal1V-0003Va-AF for submit@debbugs.gnu.org; Sun, 26 Jun 2011 04:48:57 -0400 Original-Received: from mailout-de.gmx.net ([213.165.64.23]) by debbugs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1Qal1S-0003VN-GZ for 8929@debbugs.gnu.org; Sun, 26 Jun 2011 04:48:55 -0400 Original-Received: (qmail invoked by alias); 26 Jun 2011 08:48:47 -0000 Original-Received: from p57BB958A.dip0.t-ipconnect.de (EHLO detlef.gmx.de) [87.187.149.138] by mail.gmx.net (mp043) with SMTP; 26 Jun 2011 10:48:47 +0200 X-Authenticated: #3708877 X-Provags-ID: V01U2FsdGVkX18qKNt6WhQqzKEpXr5bxUHB6kW7SzDR5m3E5LH42j JnPln0ixiL0Saw In-Reply-To: <87tybf4b6l.fsf@ubik.of1par.int.rtblw.com> ("=?UTF-8?Q?S=C3=A9bastien?= Gross"'s message of "Fri, 24 Jun 2011 15:21:38 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-Y-GMX-Trusted: 0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Sun, 26 Jun 2011 04:49:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:47487 Archived-At: S=C3=A9bastien Gross 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.