GNU bug report logs - #1474
23.0.60; desktop.el don't check if pid in his lock file is always in use

Previous Next

Package: emacs;

Reported by: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>

Date: Tue, 2 Dec 2008 21:55:04 UTC

Severity: wishlist

Tags: patch

Merged with 25232

Found in version 24.4

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
To: "Juanma Barranquero" <lekktu <at> gmail.com>
Cc: 1474 <at> debbugs.gnu.org, emacs-pretest-bug <at> gnu.org,
        emacs <at> gentoo.org
Subject: bug#1474: 23.0.60; desktop.el don't check if pid in his lock file is always in use
Date: Wed, 03 Dec 2008 07:36:53 +0100
"Juanma Barranquero" <lekktu <at> gmail.com> writes:

> On Tue, Dec 2, 2008 at 22:43, Thierry Volpiatto
> <thierry.volpiatto <at> gmail.com> wrote:
>
>> | (eq 0 (call-process-shell-command (format "ps -u %s | grep emacs | grep %d" (getenv "USER") owner)))
>
> In Emacs 23.X I think you could use `system-process-attributes'
> instead of running an external ps process.

Yes, here is the code that can be used in desktop.el:

,----
| (and (system-process-attributes owner)
|      (string-match "emacs"
|                    (cdr (assq 'comm
|                               (system-process-attributes owner)))))
`----

> But one way or the other, what if the desktop lock file resides in a
> non-local drive?

If emacs process number <owner> doesn't exist, the "else" block is used.
  
-- 
A + Thierry Volpiatto
Location: Saint-Cyr-Sur-Mer - France




This bug report was last modified 3 years and 58 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.