[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: desktop.el and his lock file
From: |
Miles Bader |
Subject: |
Re: desktop.el and his lock file |
Date: |
Wed, 03 Dec 2008 16:19:11 +0900 |
Thierry Volpiatto <address@hidden> 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.