]> code.delx.au - gnu-emacs/commitdiff
* lisp/desktop.el (desktop-read): Claim the lock when the owner is not the current...
authorJuri Linkov <juri@jurta.org>
Fri, 7 Feb 2014 07:58:10 +0000 (09:58 +0200)
committerJuri Linkov <juri@jurta.org>
Fri, 7 Feb 2014 07:58:10 +0000 (09:58 +0200)
Fixes: debbugs:16157
lisp/ChangeLog
lisp/desktop.el

index a86293b6fa2df76fdc758d1b40e2b7062f9ab40f..fd1ad94af2920390436ac1a73c3099fae8fe0c78 100644 (file)
@@ -1,3 +1,8 @@
+2014-02-07  Juri Linkov  <juri@jurta.org>
+
+       * desktop.el (desktop-read): Claim the lock when the owner is not
+       the current process.  (Bug#16157)
+
 2014-02-07  Juri Linkov  <juri@jurta.org>
 
        * desktop.el (desktop-buffers-not-to-save): Change default from nil
index be348b60a99d00405b23b032ebc6a77114f541a3..3380e39445b75461ac3ddeecf94021872e144eae 100644 (file)
@@ -1108,7 +1108,7 @@ Using it may cause conflicts.  Use it anyway? " owner)))))
            (setq desktop-file-modtime (nth 5 (file-attributes (desktop-full-file-name))))
            ;; If it wasn't already, mark it as in-use, to bother other
            ;; desktop instances.
-           (unless owner
+           (unless (eq (emacs-pid) owner)
              (condition-case nil
                  (desktop-claim-lock)
                (file-error (message "Couldn't record use of desktop file")