bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#8929: 24.0.50; tramp hangs when process died


From: Sébastien Gross
Subject: bug#8929: 24.0.50; tramp hangs when process died
Date: Mon, 27 Jun 2011 10:57:40 +0200
User-agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (gnu/linux)

Michael Albinus <address@hidden> writes:

Hi,


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

I do totally agree with you about the debugging purposes. So why not
setting up a variable such as:

(defcustom tramp-kill-process-buffer-on-exit nil 
  "Kill remote shell buffer process if connection with remote host is
  lost."
  :group 'tramp
  :type 'boolean)

Setting by default this variable to `nil' doesn't affect current tramp
behavior. Then one can chose how tramp should handle process ending by
changing `tramp-kill-process-buffer-on-exit'.

And add in `tramp-maybe-open-connection':

  ;; Kill buffer when process died.
  (when tramp-kill-process-buffer-on-exit
    (set-process-sentinel
      p
      (lambda (proc change)
        (when (eq (process-status proc) 'exit)
         (kill-buffer (process-buffer proc)))


>
> 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?
>
> (require 'dbus)
> (dbus-register-signal
>  :system "org.freedesktop.UPower" "/org/freedesktop/UPower"
>  "org.freedesktop.UPower" "Resuming" 'tramp-cleanup-all-connections)
>
> If this works for you (it does for me), I would add a custom option for
> enabling this behaviour.

This works fine but on in one use case on power resuming. If for some
reason the connection with a remote host is lost, the dbus solution acts
more like a workaround, not like a global issue solving.


Cheers,

-- 
Sébastien Gross





reply via email to

[Prev in Thread] Current Thread [Next in Thread]