all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Thierry Volpiatto <thierry.volpiatto@gmail.com>
To: Miles Bader <miles@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: desktop.el and his lock file
Date: Wed, 03 Dec 2008 08:26:10 +0100	[thread overview]
Message-ID: <87vdu1k9d9.fsf@tux.homenetwork> (raw)
In-Reply-To: <buo1vwpu3o0.fsf@dhapc248.dev.necel.com> (Miles Bader's message of "Wed, 03 Dec 2008 16:19:11 +0900")

Miles Bader <miles@gnu.org> writes:

> Thierry Volpiatto <thierry.volpiatto@gmail.com> writes:
>> here is the code i put after line 967 in desktop.el:
>>
>> the function is desktop-read
>> ,----
>> | (if (and owner
>> |          (eq 0 (call-process-shell-command (format "ps -u %s | grep emacs | grep %d" (getenv "USER") owner)))
>> |          .....
>> `----
>
> It might be better to use the `signal-process' function with signal
> number 0 -- that will just check to see if the process exists and return
> an appropriate exit code (0 = exists, -1 = doesn't exist), without
> actually sending any signal.
>
> [I guess it won't work on windows, but presumably neither does your
> pipeline... :-]

yes:

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

-- 
A + Thierry Volpiatto
Location: Saint-Cyr-Sur-Mer - France




      reply	other threads:[~2008-12-03  7:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-02 21:26 desktop.el and his lock file Thierry Volpiatto
2008-12-03  7:19 ` Miles Bader
2008-12-03  7:26   ` Thierry Volpiatto [this message]

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=87vdu1k9d9.fsf@tux.homenetwork \
    --to=thierry.volpiatto@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=miles@gnu.org \
    /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.