# HG changeset patch # User Sam Steingold # Date 1254858735 0 # Node ID c8d4e5f3f0c89a20fabbb756a8ac4108ba2476c1 # Parent a712582124ee1fd7dc1074b9ced6a2f4952d39d1 (tramp-compat-process-running-p): Check that the comm attribute is present before calling regexp-quote. diff -r a712582124ee -r c8d4e5f3f0c8 lisp/ChangeLog --- a/lisp/ChangeLog Tue Oct 06 18:32:07 2009 +0000 +++ b/lisp/ChangeLog Tue Oct 06 19:52:15 2009 +0000 @@ -1,3 +1,8 @@ +2009-10-06 Sam Steingold + + * net/tramp-compat.el (tramp-compat-process-running-p): Check that + the comm attribute is present before calling regexp-quote. + 2009-10-06 Juanma Barranquero * play/animate.el (animate-string): For good effect, make sure diff -r a712582124ee -r c8d4e5f3f0c8 lisp/net/tramp-compat.el --- a/lisp/net/tramp-compat.el Tue Oct 06 18:32:07 2009 +0000 +++ b/lisp/net/tramp-compat.el Tue Oct 06 19:52:15 2009 +0000 @@ -312,15 +312,15 @@ (dolist (pid (funcall (symbol-function 'list-system-processes)) result) (let ((attributes (funcall (symbol-function 'process-attributes) pid))) - (when - (and (string-equal - (cdr (assoc 'user attributes)) (user-login-name)) - ;; The returned command name could be truncated - ;; to 15 characters. Therefore, we cannot check - ;; for `string-equal'. - (string-match - (concat "^" (regexp-quote (cdr (assoc 'comm attributes)))) - process-name)) + (when (and (string-equal + (cdr (assoc 'user attributes)) (user-login-name)) + (let ((comm (cdr (assoc 'comm attributes)))) + ;; The returned command name could be truncated + ;; to 15 characters. Therefore, we cannot check + ;; for `string-equal'. + (and comm (string-match + (concat "^" (regexp-quote comm)) + process-name)))) (setq result t)))))) ;; Fallback, if there is no Lisp support yet.