From: Miles Bader <miles@gnu.org>
To: Thierry Volpiatto <thierry.volpiatto@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: desktop.el and his lock file
Date: Wed, 03 Dec 2008 16:19:11 +0900 [thread overview]
Message-ID: <buo1vwpu3o0.fsf@dhapc248.dev.necel.com> (raw)
In-Reply-To: <87ej0qfeu5.fsf@tux.homenetwork> (Thierry Volpiatto's message of "Tue, 02 Dec 2008 22:26:58 +0100")
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... :-]
-Miles
--
.Numeric stability is probably not all that important when you're guessing.
next prev parent reply other threads:[~2008-12-03 7:19 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 [this message]
2008-12-03 7:26 ` Thierry Volpiatto
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=buo1vwpu3o0.fsf@dhapc248.dev.necel.com \
--to=miles@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=thierry.volpiatto@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.