all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Thierry Volpiatto <thierry.volpiatto@gmail.com>
To: "Juanma Barranquero" <lekktu@gmail.com>
Cc: emacs-pretest-bug@gnu.org, 1474@emacsbugs.donarmstrong.com,
	emacs@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	[thread overview]
Message-ID: <87zljdkbne.fsf@tux.homenetwork> (raw)
In-Reply-To: <f7ccd24b0812021439n1e153c0cy312c63522c47c65@mail.gmail.com> (Juanma Barranquero's message of "Tue, 2 Dec 2008 23:39:52 +0100")

"Juanma Barranquero" <lekktu@gmail.com> writes:

> On Tue, Dec 2, 2008 at 22:43, Thierry Volpiatto
> <thierry.volpiatto@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






  reply	other threads:[~2008-12-03  6:36 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-02 21:43 bug#1474: 23.0.60; desktop.el don't check if pid in his lock file is always in use Thierry Volpiatto
2008-12-02 22:39 ` Juanma Barranquero
2008-12-03  6:36   ` Thierry Volpiatto [this message]
2008-12-03  8:25     ` Juanma Barranquero
2008-12-03  8:47       ` Thierry Volpiatto
2008-12-03  9:15         ` Juanma Barranquero
2008-12-03 10:08           ` Thierry Volpiatto
2008-12-03 10:20             ` Juanma Barranquero
2008-12-03 21:27         ` Stefan Monnier
2008-12-03  9:14       ` Ulrich Mueller
2008-12-03  9:16         ` Juanma Barranquero
2008-12-02 22:52 ` Stefan Monnier
2008-12-02 23:06   ` Ulrich Mueller
2008-12-03  6:30   ` Thierry Volpiatto
2020-01-24 16:47 ` Stefan Kangas
2020-02-08 14:23   ` Stefan Kangas
2020-02-08 15:20     ` Eli Zaretskii
2020-04-27 10:34       ` Stefan Kangas
2020-04-27 14:50         ` Eli Zaretskii
2022-03-24  8:25           ` bug#1474: bug#25232: 24.4; Eliminate - Warning: Desktop file appears to be " Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87zljdkbne.fsf@tux.homenetwork \
    --to=thierry.volpiatto@gmail.com \
    --cc=1474@emacsbugs.donarmstrong.com \
    --cc=emacs-pretest-bug@gnu.org \
    --cc=emacs@gentoo.org \
    --cc=lekktu@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.