changeset 96990:c9371b294083

* net/tramp.el (tramp-handle-start-file-process): Make NAME a unique process name. Reported by Markus Triska <markus.triska@gmx.at>.
author Michael Albinus <michael.albinus@gmx.de>
date Thu, 24 Jul 2008 21:45:45 +0000
parents 691e8bf892cb
children fd827dfc34e5
files lisp/net/tramp.el
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/net/tramp.el	Thu Jul 24 21:45:01 2008 +0000
+++ b/lisp/net/tramp.el	Thu Jul 24 21:45:45 2008 +0000
@@ -3677,11 +3677,17 @@
   "Like `start-file-process' for Tramp files."
   (with-parsed-tramp-file-name default-directory nil
     (unwind-protect
-	(progn
+	(let ((name1 name)
+	      (i 0))
 	  (unless buffer
 	    ;; BUFFER can be nil.  We use a temporary buffer, which is
 	    ;; killed in `tramp-process-sentinel'.
 	    (setq buffer (generate-new-buffer tramp-temp-buffer-name)))
+	  (while (get-process name1)
+	    ;; NAME must be unique as process name.
+	    (setq i (1+ i)
+		  name1 (format "%s<%d>" name i)))
+	  (setq name name1)
 	  ;; Set the new process properties.
 	  (tramp-set-connection-property v "process-name" name)
 	  (tramp-set-connection-property v "process-buffer" buffer)